L
Lamer
When I try to import a .CSV file programatically in Excel, the result is not
satisfying. Afterwards, I have to set the document to 'delimited' by hand,
using the "convert text to columns wizard".
When I open the CSV file with Explorer, I get the desired format imediately,
namely each semicolon separated piece of text in a separate column.
My CSV is as follows:
"Aap"; "Noot"; "Mies"; "Wim"
"Snappy"; "das"; "kleine"; "krokodil"
"Ik"; "snap";"niks";"van";"excel"
It is imported like this (C#):
Excel.ApplicationClass excel = new Excel.ApplicationClass();
excel.Visible = false;
excel.Workbooks.OpenText(tmp_file_name, Missing.Value, Missing.Value,
XlTextParsingType.xlDelimited, XlTextQualifier.xlTextQualifierDoubleQuote,
Missing.Value, Missing.Value, true, Missing.Value, Missing.Value,
Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value,
Missing.Value, Missing.Value, Missing.Value);
Can someone explain to me what I am doing wrong? Thanks!
Atrhur
satisfying. Afterwards, I have to set the document to 'delimited' by hand,
using the "convert text to columns wizard".
When I open the CSV file with Explorer, I get the desired format imediately,
namely each semicolon separated piece of text in a separate column.
My CSV is as follows:
"Aap"; "Noot"; "Mies"; "Wim"
"Snappy"; "das"; "kleine"; "krokodil"
"Ik"; "snap";"niks";"van";"excel"
It is imported like this (C#):
Excel.ApplicationClass excel = new Excel.ApplicationClass();
excel.Visible = false;
excel.Workbooks.OpenText(tmp_file_name, Missing.Value, Missing.Value,
XlTextParsingType.xlDelimited, XlTextQualifier.xlTextQualifierDoubleQuote,
Missing.Value, Missing.Value, true, Missing.Value, Missing.Value,
Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value,
Missing.Value, Missing.Value, Missing.Value);
Can someone explain to me what I am doing wrong? Thanks!
Atrhur