Trouble with DataTableToCsv then exporting it using WriteFile
Hi All,
I have what is probably a simple question, but I can't seem to figure it out.
In my workflow i'm turning a datatable into a CSV file (string Result) then i want to export the CSV file to a folder on the computer using WriteFile but i'm not sure what to put for Bytes since the CSV file Result is in String format.....
Any ideas?
-
Thank you Ryan!
I'm assuming that System.Text.Encoding.ASCII.GetBytes(string) is the variable type I will assign to my CVS output, however it doesn't to exist in my .Net Type Variables when I look to import it.
Only System.Text.Encoding exists, am I missing something? Or do I need to download it?
Thanks again.
0 -
Hi Robin,
System.Text.Encoding.ASCII.GetBytes(string) is a method. It accepts a string and returns a byte array. You shouldn't need to use an import here.
--Ryan
0 -
Ok that makes more sense! I got it working now, thank you very much Ryan!
0
Please sign in to leave a comment.
Comments
3 comments