Gaming1 min ago
Excel CSV files
14 Answers
Here's what I'd like to do. I have a CSV file that is generated by another program, the problem is that when I open it in excel, Excel applies it's formatting based on what it thinks the data is, eg I have text fields that can also be numbers but I want them to be text and retain leading zeroes etc but excell is determined they are numeric and strips off the leading zeroes. Is there some sort of inbedded command I can use to tell it what type each colum is for example? The result must open correctly without any need to fancy importing etc as the target audience are IT iIliterate. thanks
Answers
Best Answer
No best answer has yet been selected by R1Geezer. Once a best answer has been selected, it will be shown here.
For more on marking an answer as the "Best Answer", please visit our FAQ.I can do all the things you suggest but this has to be idiot proof so it should just open and be correct. I am well aware of the import manipulations etc but what I really want is some way of telling excel, in the data, to leave it alone. Eg I can put double quotes around text and that works I can even imbed commas inside quotes but when I put quotes around a number it ignores them and interprets it as numeric eg I have one field like this "000123" and it becomes 123 in general format.
Spoc, I just generate the numbers with leading 0's and then wrap the quotes and = sign round, when the file is openned the leading 0's are still there, eg ="000123" gets put in it's cell as 000123, perfect, where as before I was getting 123 without the leading 0's and annoyingly it was left justified. The CSV file is generated from a database and then uploaded via email and sent to the users who should just be able to open it and it will look right.
ABerrant are there any other "magic" characters that do things when loaded from a CSV?
ABerrant are there any other "magic" characters that do things when loaded from a CSV?
Related Questions
Sorry, we can't find any related questions. Try using the search bar at the top of the page to search for some keywords, or choose a topic and submit your own question.