+ Reply to Thread
Results 1 to 2 of 2

Excel workboox.saveas freezes program

  1. #1
    Ryan
    Guest

    Excel workboox.saveas freezes program

    In C# I create and open an excel spreadsheet, populate it with data,
    and then attempt to save it. This all works fine on my XP SP2 machine
    with Excel 2003. However when I try to run it on Windows 2000 with
    Excel 2000, the code gets stuck on _wb.Saveas (see code snippet below).

    _app = new Excel.Application();
    _wb = _app.Workbooks.Add(Type.Missing);
    _ws = (Excel._Worksheet) _wb.Sheets.get_Item(1);

    //populate the worksheet with data

    _wb.SaveAs(aFileName, Type.Missing, Type.Missing, Type.Missing,
    Type.Missing, Type.Missing,
    Excel.XlSaveAsAccessMode.xlNoChange,Type.Missing, Type.Missing,
    Type.Missing, Type.Missing,Type.Missing);

    Thanks,
    Ryan


  2. #2
    Ryan
    Guest

    Re: Excel workboox.saveas freezes program

    Sorry about the double post.

    Use the newer one pls (not this one).

    Ryan wrote:
    > In C# I create and open an excel spreadsheet, populate it with data,
    > and then attempt to save it. This all works fine on my XP SP2 machine
    > with Excel 2003. However when I try to run it on Windows 2000 with
    > Excel 2000, the code gets stuck on _wb.Saveas (see code snippet below).
    >
    > _app = new Excel.Application();
    > _wb = _app.Workbooks.Add(Type.Missing);
    > _ws = (Excel._Worksheet) _wb.Sheets.get_Item(1);
    >
    > //populate the worksheet with data
    >
    > _wb.SaveAs(aFileName, Type.Missing, Type.Missing, Type.Missing,
    > Type.Missing, Type.Missing,
    > Excel.XlSaveAsAccessMode.xlNoChange,Type.Missing, Type.Missing,
    > Type.Missing, Type.Missing,Type.Missing);
    >
    > Thanks,
    > Ryan



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1