Hi,
As i had mentioned i have 2 worksheets. I want to update the named ranges for in sheet1.
I tried the following:-
'clearing the range in sheet2
Dim range1 As IRange = heet2.UsedRange("oap")
range1.Clear()
'adding new values from database via this method.
sheet2.ImportDataTable(listdatatable, False, 2, 1)
'Adding new name to the newly added values in sheet2.
Dim oName As IName = sheet2.Names.Add("oap", range2)
'updating the formulas in sheet1.
sheet1.Range("A1").Formula = "="Sheet1!$A$2:$A$" & counttoaddonformula(counts the number of added values + the
previous values and assignes that number to complete the formula) like this "Sheet1!$A$2:$A$8"
I know that i saw in your code samples formula works across worksheets. I tried to do the above. After doing so
i am getting a "#value" error on my sheet1 on cell "a1"
I can attach only 1 file now and the saved file is Testrangesavedlist.xls
If you open the Testrangesavedlist.xls on sheet1 you will find the following:-
1) "#value!" error
2) The formula in cell "a1" has changed from Sheet1!$A$2:$A$15 to Sheet1!$A$2:$A$19 but the new values are missing in that list,
though sheet2 is updated.
what is wrong here? Your help is greatly appreciated.
Thanks
Vidya
>Hi,
Please see the attached excel file
I am using Syncfusion.XlsIO.Web and Syncfusion.XlsIO.Base dll's to access excel file update values via VB.net application and saveit
1) In Sheet1, cell A2 references list values of the named range in Sheet2 A column which is called "Cities"
The names range formula (for sheet1,A2) is
=Sheet2!$A$2:$A$6 (ctrl+F3 to go to name manager window)
When i update values of cities i.e when i add more values for cities in asp.net application
I need to update excel file also with the updated named range.Currently in my excel file there are 5 cities.
After update let's say there are 7 cities.
Sheet 1 should reflect the updated range
The named range formula (for sheet1,A2) should be updated to =Sheet2!$A$2:$A$8
2) Also how can i delete each cell value using Syncfusion. Do you have any class targeting Excel cell?
I appreciate your help on this
Thanks,
Vidya Jayakumar
gbrange_e38b65a.ziptestrangesavedlist_d5ceb648.zip