Options

Error while opening attached .CSV file !!!

pskannaapskannaa Member Posts: 138
Dear All,

I'm using NAV 4.0, i have form for attaching the files like "import/open/remove attachment". All are fine but when i imported the .CSV file it was succesfully imported, if i open the imported attached csv file it's throughing error message i'm unable to open it.
other all files are fine eg: .doc,.xls,.txt etc..

Error:
C/Side Hyperlinking failed.
You tried to hyperlink to this target:
C:\docume~1\psk\local~1\temp\doc.csv
do you want to place the hyperlink target on the clipboard ?
Yes / NO ----> nothing has changed the both actions.


Open Attachement code:

FormAttRec.SETFILTER(FormAttRec."No.","No.");
FormAttRec.SETFILTER(FormAttRec.Description,Description);

IF FormAttRec.FIND('-') THEN
BEGIN
IF FormAttRec."Attachment No." <> 0 THEN
FormAttRec.OpenAttachment
END
ELSE
BEGIN
MESSAGE('No Document is Attached');
EXIT;
END;
CurrForm.UPDATE;


Please suggest me..

Thanks & Regards,
Psk

Comments

  • Options
    philippegirodphilippegirod Member Posts: 191
    Are you sure your file exist in the path shown ?
    This message is shown when Navision is not able to open the file.
    My candle burns by both ends, it will not last the night,
    But oh my foes and oh my friends, it gives a lovely light
  • Options
    pskannaapskannaa Member Posts: 138
    Actually i have specified c:\ for file path, but other files(.doc,.xls,.txt) are working file. I don't knw why it's happened for .csv format.
  • Options
    BeliasBelias Member Posts: 2,998
    does the file still exist?
    also, try to show the extention of file in windows...and check permissions on that folder, also, check if the path is correct
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • Options
    pskannaapskannaa Member Posts: 138
    The file is there, for checking i hav removed attached file and again imported the file. Permission i doubt because it should be asking for all files while opening right ?? so some where it's strucking for ONLY CSV FORMAT.
  • Options
    BeliasBelias Member Posts: 2,998
    did you already try to change the destination path?
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • Options
    pskannaapskannaa Member Posts: 138
    I think there is some limitation while opening .csv file in nav...any idea?
  • Options
    garakgarak Member Posts: 3,263
    search the forum for the automation WSH (Windows Scriptiong Host) and use WSHShell.run(command).
    Do you make it right, it works too!
  • Options
    pardonmepardonme Member Posts: 8
    Hi all..

    I'm having the same problem here
    Cannot open the .csv file

    I already use the Automation WSHShell.RUN
    but got error :

    "An exception was raised in method Run. The OLE control or Automation server has returned error (HRESULT) -2147352567.
    The component did not provide the exception description."

    actually not only .csv file, but .doc, .pdf, and some .txt files (some can be opened, some cannot.. i also dont understand why) also cannot be opened.
    any idea what's wrong?
  • Options
    chrisxx83chrisxx83 Member Posts: 54
    pardonme wrote:
    Hi all..

    I'm having the same problem here
    Cannot open the .csv file

    I already use the Automation WSHShell.RUN
    but got error :

    "An exception was raised in method Run. The OLE control or Automation server has returned error (HRESULT) -2147352567.
    The component did not provide the exception description."

    actually not only .csv file, but .doc, .pdf, and some .txt files (some can be opened, some cannot.. i also dont understand why) also cannot be opened.
    any idea what's wrong?

    I got similar issue and the problem was file name. When i try to open file with WHS and in file name was space then i got the same error. Try to to something like this:
    wsh.Run('"'+"FilePathVariable"+'"');
    
  • Options
    pardonmepardonme Member Posts: 8
    I got similar issue and the problem was file name. When i try to open file with WHS and in file name was space then i got the same error. Try to to something like this:
    wsh.Run('"'+"FilePathVariable"+'"');
    

    ^ AWESOMENESS

    Thank You, chrisxx83
Sign In or Register to comment.