I wish to append a new row into CSV file (action triggered by clock), being able to open it in Microsoft Excel in the following set of data:
What's wrong with these blocks Guys? I'm still getting results in just one row and lots of """ signs that are not desirable.
What's wrong with these blocks Guys? I'm still getting results in just one row and lots of """ signs that are not desirable.
--
remove the list to csv table block.
--
I am still getting all data in exactly one row.
--
--
yes, list to csv row will convert everything into one row
--
you probably like to use list to csv table instead?
assuming, global templist is a list of lists...
you might want to provide a screenshot incl. Do it result next time...
To elaborate, my bit of code adds a single line to a CSV file every time it is called (templist is just a simple list). The point is you need to add the /n to make sure the next time the code is called the data is written to a new line.
--
--
The problem is with Excel.
--
Despite the name (Comma Separated Values), it usually uses ; as separator value instead of ,
You could transform the text in the file by using replace all text first to replace " by an empty string, and next, replace , by ;
A problem could be that your values also contain a , therefor the " is used in AI. And maybe, if you use ; instead of , excel will see your " enclosed values as text, and strip them.
Try it out.
My version of excel (2007) works OK with commas etc. Not sure which version you are using. You could try making the extension .txt then excel will ask for separators etc
--
--
Does it help to tell Excel ahead of time that those columns should hold only numerical values before loading the csv data?
--
I think I can see a problem with your CSV file in that it does not follow the pattern "data1","data2"," data3","data4", etc. I don't know why it has happened.
I can see things like data1""data2 and data1"data2. This will confuse excel.
Happy to look at your code and your CSV file if you post them.
--
I can see things like data1""data2 and data1"data2. This will confuse excel.
Happy to look at your code and your CSV file if you post them.
--
댓글 없음:
댓글 쓰기