Dataset to XLS
Hi to all
with the Dataset to XLS Activity is there a way to get the Worksheets of the generated spreadsheet to use the Tablename of the DataTable(s) that make it up?
I would like to have the Worksheets appropriately named as to their content or purpose such as 'Disclaimer' and 'FileNumbers'
Currently the worksheets are ending up being called Table1 and Table 2
Thanks
Ralph
/customer/servlet/servlet.FileDownload?file=00P6000000e88CREAY
/customer/servlet/servlet.FileDownload?file=00P6000000e88LgEAI
/customer/servlet/servlet.FileDownload?file=00P6000000e88LqEAI
-
Hi Ralph,
We do set the Worksheet names to match the DataTable names if they have been set.
In your case the SqlQuery activity overwrites your "theDataTable" variable after you have set the table name. The SqlQuery activity creates a new DataTable and assigns it to the specified variable. It does not populate an existing DataTable held in that variable. Just move the Assign activity that sets the table name to after the SqlQuery activity and it should work.
Also, you can remove the first Assign activity since you don't need to create the DataTable ahead of time.
--Ryan
0 -
Hi Ryan
thanks for the prompt reply. I have made those changes and it is indeed something to cheer my heart to have it work so tidily ;-) on a Wednesday morning
/customer/servlet/servlet.FileDownload?file=00P6000000e88LvEAI
Regards
Ralph
0 -
Hi Ralph,
Were you able to define the column widths, format the text (bold) etc. in your workflow or was this in Excel after the data had already been opened in Excel. I've got a datatable which is converted to xls and then opened by a user, but I'd like to format the column widths etc. so it shows 'nicely' in Excel. Any ideas?Thanks,
Mark0 -
Hi Mark
you are correct that I did the bold text etc once I had opened it in Excel.
If you want too be able to do that sort of thing ahead of time then I suggest that a look at the Aspose.com suite of tools may be what you require.
Thanks
Ralph Price
0 -
Hi Ralph - did you get your workflow to output 2 different xls sheets? I'm trying to do something to that effect with 3 different datatables (to create 3 different sheets in Excel). Do you have any advice on how to go about this?
Thanks,
Andrew
0 -
Hi Andew
yes my example shows two separate worksheets in the one xls file.
Note that you are converting a DataSET to a spreadsheet not a DataTable. Every datatable in the dataset will get it's own sheet. You need to make sure that you have named the DataTables using an Assign Activity:
myDataTable1.TableName = "FirstWorksheet"
myDataTable2.TableName = "SecondWorksheet"
Let me know if you want more guidance than that
Thanks
Ralph
0 -
Makes total sense... thanks for the input!
0 -
So glad I found this thread! Thank you, this helped me to make a workflow run just the way I'd been trying for a few days.
0
Please sign in to leave a comment.
Comments
8 comments