Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Thu Jun 27, 2013 9:30 pm

Hi,

is it possible to open file, edit it, and save it under the same name?
VS gives me error, saying that worksheet must be saved under the unique name :/

Pasting code from your demo that saves file under different name :
private void btnRun_Click(object sender, System.EventArgs e)
{

Workbook workbook = new Workbook();

//Load workbook from disk.
workbook.LoadFromFile(@"..\..\..\..\..\..\Data\EditSheetSample.xls");
//Initialize worksheet
Worksheet sheet = workbook.Worksheets[0];

//Writes string
sheet.Range["B1"].Text = "Hello,World!";
//Writes number
sheet.Range["B2"].NumberValue = 1234.5678;
//Writes date
sheet.Range["B3"].DateTimeValue = System.DateTime.Now;
//Writes formula
sheet.Range["B4"].Formula = "=1111*11111";

workbook.SaveToFile("Sample.xls");
ExcelDocViewer(workbook.FileName);
}

private void ExcelDocViewer( string fileName )
{
try
{
System.Diagnostics.Process.Start(fileName);
}
catch{}
}

korisnik
 
Posts: 2
Joined: Thu Jun 13, 2013 2:58 pm

Fri Jun 28, 2013 6:51 am

Hello,

Thanks for your inquiry.

Actually, it could open file, edit it, and save it under the same name. There is a evaluation messages in the test xls file, the evaluation messages will generate again when it is saved, so you give the error that worksheet must be saved under the unique name. We have sent you a temporary license to test.

If there are any question, welcome to get it back to us.

Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Wed Jul 03, 2013 9:51 am

Hello,

Has the issue been resolved? Could you please give us some feedback if convenience?

If there are any questions, welcome to get it back to us.

Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Mon Jul 08, 2013 9:30 pm

Problem solved


ty

korisnik
 
Posts: 2
Joined: Thu Jun 13, 2013 2:58 pm

Return to Spire.XLS