Free Support Forum - aspose.com

DateDif

.Net version

when I try and access a field that was computed using DateDif - Aspose tells me there is an error in the field. Pull up the spreadsheet and it is fine. Need to be able to grab the field out of the spreadsheet and put it into a database.


Hi,

Thanks for your posting and using Aspose.Cells.

Please provide us your sample simple project replicating your issue with the latest version: Aspose.Cells
for .NET v7.4.0.3


Please also provide your source xls/xlsx files used in your project.

We will look into your issue and help you asap.

Attached is test spreadsheets (before (no aspose in the name) and after running code).

Here is the sample code:

Date ldt_1, ldt_2<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Aspose.Cells.Workbook lac_wb

Aspose.Cells.worksheet lac_ws

Aspose.Cells.Cells lac_cells

Aspose.Cells.Cell lac_cell

Aspose.Cells.License iLicense_cells

try

iLicense_cells = create Aspose.Cells.License()

ilicense_cells.SetLicense('c:\aspose\Aspose.Total.lic') // Must validate the License

as_ss = "C:\temp\test_datedif.xlsx"

lac_wb = create Aspose.Cells.WorkBook(as_ss)

lac_wb.CalculateFormula()

lac_ws = lac_wb.worksheets[1]

lac_cells = lac_ws.cells

// lac_cells.CalculateFormula(true,true,laccf)

ldt_1 = 2009-01-22

ldt_2 = 2013-02-11

lac_cells["B1"].PutValue(ldt_1)

lac_cells["B2"].PutValue(ldt_2)

lac_wb.CalculateFormula()

//

// now simply copy the values from one computed cell (B cells) to how Aspose interpreted (C Cells)

//

lac_cells["C3"].PutValue(lac_cells["B3"].Value);

lac_cells["C4"].PutValue(lac_cells["B4"].Value);

lac_cells["C5"].PutValue(lac_cells["B5"].Value);

lac_cells["C6"].PutValue(lac_cells["B6"].Value);

lac_cells["C7"].PutValue(lac_cells["B7"].Value);

lac_cells["C8"].PutValue(lac_cells["B8"].Value);

catch(System.Exception ex)

MessageBox("Sys Error", ex.Message,StopSign!)

halt

end try

as_ss = "C:\temp\test_datedif_aspose.xlsx"

if li_savemethod = 5 then

lac_wb.Save(as_ss,Aspose.cells.SaveFormat.Excel97To2003)

else

lac_wb.Save(as_ss,Aspose.cells.SaveFormat.Xlsx)

end if

destroy lac_wb

destroy iLicense_cellsv

Hi,

Thanks for your posting and using Aspose.Cells.

Please provide a runnable sample code/project. Your code looks in double language i.e C# and VB.NET and it is unable to be compiled.

We will look into your issue and help you asap.

Attached is a c# win app project. If you put the workbook (attached in ealier post) with the shorter name in c:\Temp, and you click the button, it will create the longer named workbook in the same folder.

Hi,

Thanks for your further input.

We have logged your issue in our database. We will look into your issue and help you asap.

Once, there is some fix or update for you, we will share it with you.

This issue has been logged as CELLSNET-41406.

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

We have fixed this issue.

Please download and try this fix: Aspose.Cells for .NET v7.4.0.4 and let us know your feedback.

The issues you have found earlier (filed as CELLSNET-41406) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.