TrickierStinky Posted July 30, 2008 Share Posted July 30, 2008 Hey guys, I'm thinking of developing a script for work, which basically allows any csv to be converted into a xls document. How would i go about doing this, I can only seem to find details on how to convert xls to csv. Is this a Big task to take on? thanks matt Link to comment https://www.neowin.net/forum/topic/652330-c-net-converting-a-csv-to-an-xls-document/ Share on other sites More sharing options...
0 Antaris Veteran Posted July 31, 2008 Veteran Share Posted July 31, 2008 Well, you could do it a couple of ways: 1). If it is a client application and the user as Microsoft Excel installed, you can use the Excel COM objects to write to the file. 2). Regardless of environment (client or server), you could use the Microsoft JET OLEDDB provider to write to the file in a SQL like manner. 3). If you are doing it in a web application (ASP.NET), you could simply convert the CSV file into a HTML table, and write out the response stream as ContentType "application/vnd.ms-excel" The last option does afford you limited formatting options, as Excel does respect any styling you've applied in HTML/CSS (to its best ability). Does that help? Link to comment https://www.neowin.net/forum/topic/652330-c-net-converting-a-csv-to-an-xls-document/#findComment-589596817 Share on other sites More sharing options...
Question
TrickierStinky
Hey guys,
I'm thinking of developing a script for work, which basically allows any csv to be converted into a xls document.
How would i go about doing this, I can only seem to find details on how to convert xls to csv.
Is this a Big task to take on?
thanks
matt
Link to comment
https://www.neowin.net/forum/topic/652330-c-net-converting-a-csv-to-an-xls-document/Share on other sites
1 answer to this question
Recommended Posts