question

tong avatar image
0 Likes"
tong asked tong commented

The question is about CSV file whice is the flexsim software exports data to

Dear,I have a question about CSV file whice is the flexsim software exports data to. When I use the “fileopen()” command to export data to the CSV file .And the CSV file use comma(,) to conduct list separator,But the origal data contains the commas(,). After I use the EXCEL to load the output data from the CSV file, the output data is different from the origal data. Can we modify the list separator of CSV file to avoid conflicting with commas.Thanks very much .

Looking forward to your reply

The origal data in the flexsim software is as follows:

The output data in the EXCEL is as follows:

FlexSim 17.1.6
docking with excel
aa.png (28.1 KiB)
bb.png (34.1 KiB)
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joerg Vogel avatar image Joerg Vogel commented ·

@tong, you know the meaning of csv, do you? comma separated values.

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel commented ·

@tong, This is a question of CSV-file data structure. Please look at forums that discuss general coding problems. Thanks!

0 Likes 0 ·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered tong commented

You can try to exchange the comma character inside the string data by an escape sequence that FlexSim and Excel interpretes as a comma. Or you export your table data as a text file. Therefore you write each table cell individually into the file and you add a self defined character or a sequence of characters as a separator. Excel is able to import text files and build columns from the structure.

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

tong avatar image tong commented ·

The problem is solved. Thanks very much.You are so kind.

0 Likes 0 ·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered tong commented

You can build your string inside flexsim by concenating it from two table cells. And you export two columns instead of a column containing the separator in its cells.

An alternative is to use a different character than the comma and replace this character later by a string operation by a script that is executed while the data is loaded to FlexSim.

· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

tong avatar image tong commented ·

@Jörg Vogel Thanks for your reply.But, Because of large amount of data, the two methods are not very feasible.The fundamental approach is to modify separators in the FlexSim software. So,Can we modify the list separator of CSV file to avoid conflicting with commas in the FlexSim software ,or in other ways. Thanks very much. @phil.bobo @Ben Wilson

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel tong commented ·

@tong, You will never get a CSV file to accept a comma as regular character inside one column cell. Please be so kind and open a CSV file with a text editor. You will see, the data structure is plain text. Each column in a row is separated by comma. There isn't any header to configure the separator character.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.