Invalid CSV File name while exporting from IE

Discussion in 'ASP .Net' started by Adi, Jul 24, 2007.

  1. Adi

    Adi Guest

    Hi,

    I am having a problem in exporting the file into csv format from a website. First the name I put in the export 'box' comes over with "%" "[" , "]" and other odd characters in the FILE name and the TAB name and these cause
    problems: File can't be saved with those names. If I copy the TAB file and while it still has the default name I get into a loop where I can't change the
    tab name and end up having to abort the file because Excel says the file name is invalid. No matter how I try to change the file name, Excel says it still
    has a problem. Can anybody help me in finding the solution for this problem? Thanks........
    Adi, Jul 24, 2007
    #1
    1. Advertising

  2. Try using Server.URLEncode to encode the file's name.
    Here's more info:
    http://msdn2.microsoft.com/en-us/library/ms525738.aspx

    --
    I hope this helps,
    Steve C. Orr,
    MCSD, MVP, CSM, ASPInsider
    http://SteveOrr.net



    "Adi" wrote in message news:...
    > Hi,
    >
    > I am having a problem in exporting the file into csv format from a
    > website. First the name I put in the export 'box' comes over with "%" "["
    > , "]" and other odd characters in the FILE name and the TAB name and these
    > cause
    > problems: File can't be saved with those names. If I copy the TAB file
    > and while it still has the default name I get into a loop where I can't
    > change the
    > tab name and end up having to abort the file because Excel says the file
    > name is invalid. No matter how I try to change the file name, Excel says
    > it still
    > has a problem. Can anybody help me in finding the solution for this
    > problem? Thanks........
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider], Jul 25, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter
    Replies:
    1
    Views:
    373
    Steve C. Orr [MVP, MCSD]
    Nov 9, 2004
  2. =?Utf-8?B?Q2hyaXM=?=

    Exporting Datatable to csv file

    =?Utf-8?B?Q2hyaXM=?=, Mar 16, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    24,154
    Steve C. Orr [MVP, MCSD]
    Mar 16, 2005
  3. =?Utf-8?B?U3JpZGhhcg==?=

    change the sheet name while exporting datagrid data to excel

    =?Utf-8?B?U3JpZGhhcg==?=, Nov 9, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    535
    =?Utf-8?B?U3JpZGhhcg==?=
    Nov 9, 2006
  4. Tintin92
    Replies:
    1
    Views:
    1,694
    Andrew Thompson
    Feb 14, 2007
  5. Dan
    Replies:
    0
    Views:
    300
Loading...

Share This Page