I have an existing workbook with an ActiveX combo. We are in the process of replacing our excel code with aspose and I have come across several issues relating to the behaviour of the ListFillRange of the ActiveX combo.
Firstly, the worksheet is initially set up with a list fill range of “C$4:C$10”. When I copy the sheet via Aspose to either a new workbook (thanks for the recent fix that makes this now work) or within the workbook the range is set to “C4:C10”. The $ symbols are lost.
Secondly, as I manipulate the sheet by inserting rows and deleting columns the ListFillRange remains unchanged. I thought it might have been because I was not using methods that included updateReference but it seemed to make no difference when I changed .InsertRow(8) to .InsertRows(8,1,True) etc…
Below is the code I used to replicate:
Dim loFromWB As Aspose.Cells.Workbook loFromStr = New System.IO.FileStream("C:\Temp\FromWB.xlsx", IO.FileMode.Open, IO.FileAccess.ReadWrite, IO.FileShare.Read) loFromWB = New Aspose.Cells.Workbook(loFromStr) loFromStr.Close() loFromWB.Worksheets.AddCopy(0) loFromWB.Worksheets(1).Name = "Copy" loFromWB.Worksheets(0).Cells.InsertRows(8, 1, True) loFromWB.Worksheets(0).Cells(8, 0).Value = "8" loFromWB.Worksheets(0).Cells(8, 1).Value = "Eight" loFromWB.Worksheets(0).Cells(8, 2).Value = "Eight - 8" loFromWB.Worksheets(0).Cells.DeleteColumn(0, True) loFromWB.Save(fileName:="C:\Temp\ToWB.xlsx", saveFormat:=Aspose.Cells.FileFormatType.Xlsx) loFromWB = Nothing
In the output the sheet “Copy” demonstrates how the $ has been removed from the ListFillRange. The “Report” sheet should now be pointing to B$4:B$11 but instead points to C4:C10 (has also lost the $ without a copy) which is the original values despite the row and column manipulations.
SampleFiles.zip (23.1 KB)
Any assistance you can offer would be greatly appreciated.