Is there anything we can do either in code (ASP/JavaScript) or in Excel so that the comma separated values end up in separate columns in Excel?
相关问题
- Excel sunburst chart: Some labels missing
- Error handling only works once
- Excel formula in VBA code
- Excel VBA run time error 450 from referencing a ra
- DoCmd.TransferSpreadsheet is not recognizing works
相关文章
- Get column data by Column name and sheet name
- programmatically excel cells to be auto fit width
- Unregister a XLL in Excel (VBA)
- How to prevent excel from truncating numbers in a
- numeric up down control in vba
- Declare a Range relative to the Active Cell with V
- What's the easiest way to create an Excel tabl
- How to create a hyperlink to a different Excel she
I just tried using Tab characters for field seperators instead of commas and it worked in Excel 2007
(at least I think it's 2007, can't find Help/About in the stupid ribbon)
You can try saving the file as .txt, not .csv, this forces Excel to parse text lines into columns
If you use "," Excel 2007 will read it, but not 2003. And if you use ";", its the other way around.
So, the best way is to generate a html table and output it as .xls. Excel 2007 will ask if its from a trusted source.
Here is a code example of how to do it:
once it is imported, you can go to 'Tools' -> 'Text to Columns...' menu and specify a delimiting character.
If you open the file via Excel's 'File --> Open' menu, then it will separate the values in the cells.
Excel seems to get confused by UTF-16/UTF-8 byte order marks, so try getting rid of them.
With CSV, the contents of the cells can be unicode characters, but the separator, quote and newline characters always must be be ASCII. You can think about CSV as always being ASCII but each cell as a blob of binary and might be some unicode text.
Also, have a look at: http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm for more info.