OT: Any VBS, VBA, Excel specialist out there who might help?

Matthias Rebbe runrev260805 at m-r-d.de
Thu Jul 23 14:37:44 EDT 2009


Thanks Ken,

as i already said, i am not very familiar with vbs. My script is from  
a book.

So i am not sure, how and where in the script i should pass this  
parameter.

Regards

Matthias



Am 23.07.2009 um 19:20 schrieb Ken Ray <kray at sonsothunder.com>:

>
>> My csv file is structured like this:
>>
>> ArtNr; 
>> ShortDescription;LongDescription;ManufactureNo;EAN;Manufacturer;Stock
>> 010002;Epson LQ300; Epson LQ 300  
>> Matrixdrucker;C11C63800;8715946316949;Epson;2
>
> It looks to me like the problem may be in the Workbooks.OpenText call.
> Here's the params according to Microsoft:
>
> Workbooks.OpenText(Filename, Origin, StartRow, DataType,  
> TextQualifier,
> ConsecutiveDelimiter, Tab, Semicolon, Comma, Space, Other, OtherChar,
> FieldInfo, TextVisualLayout, DecimalSeparator, ThousandsSeparator,
> TrailingMinusNumbers, Local)
>
> Here's how your current parameters map to this:
>
>   FileName  --> sInPath
>   Origin  --> (empty)
>   StartRow  --> (empty)
>   DataType  --> (empty)
>   TextQualifier --> xlTextQualifierNone
>   ConsecutiiveDelimiter  --> (empty)
>   Tab  --> (empty)
>   Semicolon  --> True
>   Comma  --> (empty)
>   Space  --> (empty)
>   Other  --> (empty)
>   OtherChar  --> (empty)
>   FieldInfo --> Array(Array(1, 2), Array(2,2), Array(3,2), Array(4,2),
>                          Array(5,2),Array(6,1), Array(7,1), Array 
> (8,1),
>                          Array(9,1), Array(10,1), Array(11,1), Array 
> (12,2))
>   TextVisualLayout  --> (empty)
>   DecimalSeparator  --> (empty)
>   ThousandsSeparator  --> (empty)
>   TrailingMinusNumber  --> (empty)
>   Local  --> (empty)
>
> Notice that the "DataType" parameter is empty. If you do it this  
> way, Excel
> is left to try and figure out the column format (and it ignores your  
> "True"
> in "Semicolon", but apparently up until now was able to figure  
> things out
> properly).
>
> Try passing "xlDelimited" in the "DataType" parameter, which will  
> tell Excel
> that the data is definitely delimited, and force it to look at the
> "Semicolon" parameter to tell it that it's semicolon-delimited.
>
> Ken Ray
> Sons of Thunder Software, Inc.
> Email: kray at sonsothunder.com
> Web Site: http://www.sonsothunder.com/
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution



More information about the use-livecode mailing list