Hi Team,
Hi,
Thanks for providing us some details.
Please post your template files with sample code to show the issue you have mentioned, we will check your issue very soon.
Thank you.
Ok, I am attaching a test project that i created + a sample excel workbook to help you recreate.
Hi,
Thanks for providing us the project.
After an initial test using your project with template file, I am able to reproduce the issue you have mentioned. I have logged your issue into our issue tracking system with an id: CELLSNET-24204. We will soon look into your issue and get back to you.
Thank you.
Thanks.
Hi,
Thanks for sharing your concerns,
We will keep/retain the existing functionality.
Thank you.
can we please expedite this? We have a tight deadline …
Hi,
I just want to inform you that our several Chinese developers are on leave these days for their New Year’s celebrations. But, hopefully, we will look into your issue when they come back in the next week from their vacations.
Thanks for your understanding!
Hi guys. Do you have an ETA on this?
Hi,
As I told you our several Chinese developers
are on leave these days for their New Year’s celebrations. So, we can provide an eta for the issue when the come back. The are due to re-join us in a couple of days from now.
Thank you.
Man - this is cutting really close. I guess I will have to code something myself to implement this functionality …
Hi,
MS Excel does not support the shared formula which refers to other worksheet.
So if the formula refers to other worksheet, please set the formula one by one.
I am not saying that i HAVE to use setSharedFormula. All I am asking for is how to fix the bug that i attached. I even created a sample project for you !!
I assume this will not be fixed anytime soon?
Hi,
There are two solutions:
1 - Using Cell.Copy() method, please
check the following:
{
int colCount = dt.Columns.Count;
if (insertRows)
{
wsheet.Cells.InsertRows(startRow + 1, dt.Rows.Count, false);
}
//Create a record of all the formula from the current excel
Dictionary<int, string> formulaMap = new Dictionary<int, string>();
for (int i = 0; i <= colCount; i++)
{
if (wsheet.Cells[startRow, startColumn + i].IsFormula)
{
formulaMap.Add(startColumn + i, wsheet.Cells[startRow, startColumn + i].Formula);
}
}
wsheet.Cells.ImportDataTable(dt, false, startRow, startColumn, false);
foreach (int col in formulaMap.Keys)
{
string formulaString = formulaMap[col];
wsheet.Cells[startRow, col].Formula = formulaString;
}
//Now that data has been pasted, lets put the formula back
for (int i = 1; i < dt.Rows.Count; i++)
{
foreach (int col in formulaMap.Keys)
{
wsheet.Cells[startRow + i, col].Copy(wsheet.Cells[startRow, col]);
}
}
}
try Smartmarker. See this document.
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/smart-markers.html