We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Excel Replacement (Text Column)

Hi,


If replacement variable in excel textbox column-like “Replacement Error.xls”-, It doesn’t work. We test this, at last version.

Does aspose support this case?

Hi,

Thanks for your posting and using Aspose.Cells.

I am afraid, your requirements are not very clear. Could you provide more information about the issue you are facing? You can provide us your sample code or screenshot illustrating your issue and highlighting them with red circles.

BTW, we have converted your source xls file into pdf using the following code with the latest version and did not find any issue. I have attached the output pdf for your reference.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\Replacement+Error.xls”;


Workbook workbook = new Workbook(filePath);


workbook.Save(filePath + “.out.pdf”);

Our Code block:


sheet.Replace("<PRN_KK>", deger);
like this. This tag -<PRN_KK>- is existing in attachment "Replacement Error.xls"

But aspose cells doesn’t replace.


Hi Ahmet,

Thanks for your posting and using Aspose.Cells.

We have tested your issue with the following sample code and it successfully replaces “<PRN_KK>” with “Some New Text”.

I have attached the output.xls file generated by the following code and screenshot showing the output for your reference.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\Replacement+Error.xls”;


Workbook workbook = new Workbook(filePath);


Worksheet worksheet = workbook.Worksheets[0];


//Access your textbox and then replace “<PRN_KK>” with “Some New Text”

Shape shape = worksheet.Shapes[3];

shape.HtmlText = shape.HtmlText.Replace("<PRN_KK>", “Some New Text”);


workbook.Save(“output.xls”);