I'm having an issue with some fields randomly importing enclosed with added quotation marks. "Xxx" Does somebody know what might cause this or how to avoid this behavior?
|
I'm having an issue with some fields randomly importing enclosed with added quotation marks. "Xxx" Does somebody know what might cause this or how to avoid this behavior?
1 Export block attributes with only aae_id field entered (pv_tag)
2 Add reminder of attribute dated to csv spreadsheet
3 Import block attribute data from csv spreadsheet
From attachment, importing spreadsheet doesn't have quotes in vessel_location field/attribute but after importing, both attribute editor and resulting data extraction table have quotes
As it happens, I was doing some programming a few days ago that dealt with csv files. I had the same problem and figured out what was going on. Notice that the value for that field has commas in it. You are working with a "comma separated variable" file. So why isn't that value divided into 3 extra fields? If you open the file in Notepad, you will see that the string with commas in it has quotes placed around it so that the commas don't act as delimiters. The only way to fix it that I can think of, is to write some code that strips out the quotes from the attributes after the import is done. The attin command is defined in the attout.lsp file. You could modify that to do the cleanup.
Thanks for the extra set of eyes. I just wasn't seeing what was causing the issue. ~200 rows in the spreadsheet so I wasn't looking to manually correct the quotes. 👍
I just took a look at the file generated by the attout command. It's a text file, not csv, and it's tab delimited, not comma delimited. So you're changing it into a csv is what's introducing the errors. Excel can open a tab-delimited txt file. However, it added quotes to a field with commas in it and saved them when I saved it back to a txt file. I opened the file in Notepad and easily deleted the quotes before importing with the attin command. It's not hard if you keep it as a tab-delimited file. Stay away from csv.