Error exporting data to CSV
Author: andriuking
Creation Date: 10/7/2015 10:06 AM
profile picture

andriuking

#1
Hello.

I´m triying to export to CSV some data .WL files employing the code obtained from http://www2.wealth-lab.com/WL5Wiki/kbExportDataFromWL5.ashx.

My adapted code is:

CODE:
Please log in to see this code.


And the destination folder is created.

I have the next error:

Error procesing symbol: No se admite el formato proporcionado por la ruta de acceso.

It seems like exporting format isn´t valid.

Where do I´m having a mistake? Could anybody helps me?

Thanks in advance.

profile picture

Eugene

#2
Hi,

The date format is correct but your Bars.Symbol may very well contain an illegal character (e.g. some futures symbol with #, @ or whatever), causing an invalid file name:

Characters to Avoid in Directories and Filenames
profile picture

andriuking

#3
Thanks Eugene.

I undestand the reason but I don´t understand why.

The first symbol of list gives this error:

QUOTE:
Error processing symbol 0376674D:MM No se admite el formato proporcionado de la ruta de acceso.


CODE:
Please log in to see this code.


QUOTE:
Bars.Symbol:
0376674D:MM


This symbol haven´t any especial character.

Also, the directory is 'c:\Market Data\'. it Doesn´t have any special character also.

Where could be the problem?

Thanks.
profile picture

Eugene

#4
QUOTE:
0376674D:MM

If you'd take a minute of your time to follow my link above and read it carefully - because it's extremely short - you would instantly know the answer to your already resolved question. The colon ":" symbol in particular is not permitted in Windows file names. As a DIY excercise, open up Windows Explorer, try to create that file and notice the result.

Anticipating your followup question:

How to remove illegal characters from path and filenames?
profile picture

andriuking

#5
'Thanks' Eugene for you crude and impolite response.

Of couse I readed many times your link, other question it´s If I could understand correctly the problem. I´m sorry for not having enougth computing knowledge.

Also I continue having the same problem but don´t worry, I will ask for help in other site.

I will think seriously about renew my WL license next year because I don't believe I deserve this manners.

Best regards,

Andrés.

profile picture

Eugene

#6
Andrés,

Your reply quoted the exported symbol as not having any special characters when the very first link I suggested tells just the opposite. So kindly let me disagree on my response being crude - I rather intended it to sound direct.

Despite the error message in Spanish, you were given the immediate and correct suggestion that your path contains an invalid character. Then you were advised to modify your script in a way that prevents WL from creating the invalid file name, with a code example. I'm at a loss as to what may still not be clear about the problem when you've got both the complete explanation and a code solution.
profile picture

andriuking

#7
Thanks Eugene.

Now I understand where´s the problem.

Sorry for my words, but don´t think I didn´t follow your link, just only I don´t have the necessary c# knowledge to solve it.

Regards,

Andrés.
profile picture

Eugene

#8
Andrés,

Glad to have helped. I will try to explain better next time or build the phrase so as not to sound assertive. Sorry for the inconvenience.