none
microsoft.office.interop.excel.workbooks.saveas folderpath format exception RRS feed

  • Question

  • Hi All,

    I am getting an exception on using microsoft.office.interop.excel.workbooks.saveas in  folderpath when the folder path contains "_" underscore example c:/dev_files/ but when the folder path doesn't contains "_" it works perfectly fine any suggestion.

    Regards & Thanks,

    Deepanshu

    • Moved by CoolDadTx Friday, June 29, 2018 3:34 PM Office related
    Friday, June 29, 2018 2:37 PM

All replies

  • Hello Djack007,

    What application are you developing? What's your code? I tried below code and it could work for me.

    string filepath= @"C:\Users\admin\Desktop\TestFolder\Test_Folder\1.xlsx";
                workbook.SaveAs(filepath);

    Besides, What's the version of your OS or Office? Could you reproduce your issue on another PC?

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, July 2, 2018 2:00 AM
  • Hello Deepanshu,

    Do you get any errors when you save workbooks manually?


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Monday, July 2, 2018 3:25 PM
  • Hello Deepanshu,

    What's the current state of the thread? If your issue has been solved, I would suggest you provide your solution and mark it to help more people who runs into the same issue.

    If not, I would suggest provide more detail so we could try to troubleshoot your issue.

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, July 6, 2018 6:30 AM