OpenText, column separation problem.  
Author Message
WeixiaoFan





PostPosted: Top

Excel Programming >> OpenText, column separation problem.

Hello!

I have an strange problem with my VBA-Addin.
I have made an toolbar with an openfile button.

Code looks like this.
Dim Filelogg As String
Filelogg = Application.GetOpenFilename("Trends (*.skv), *.skv, Text (*.txt),
*.txt", 1, "Open Trendfile")

Workbooks.OpenText Filename:=Filelogg, _
StartRow:=1, DataType:=xlDelimited, _
ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=True _
, Comma:=False, Space:=False, Other:=False

.
Now this should work to separate the columns with an Semicolon (;)

The files i use for this is in format .skv but when i use this function it
separates the columns when a comma (,) appear.
I cant figure this out.. Comma:=False, Semicolon:=True

But when the file extension is changed from .skv to .txt it works fine.

Example on the .skv file.

Date;Time;Sum Massflow;Sum Fraction;Massflow l/min; Fractionflow
l/min;PH;Cond; Turb;Temp C

20060613; 10:23:16;0,00;0,00;0;0,00;7,24;125;1,74;12,65
20060613; 10:23:26;2,90;0,00;29;24,10;7,24;125;1,74;12,70
20060613; 10:23:36;13,70;0,00;84;18,07;7,24;125;1,74;12,80
20060613; 10:23:46;28,40;0,00;86;1,20;7,25;125;1,77;9,80

Thanks in advance for any tip that might help me forward.

Regards,
Martin

Excel339