I am creating PDFs from excel templates. We have one worksheet that contains pricing data which is used on other worksheets. I programmatically open the pricing worksheet (pricelist) and insert the price in the appropriate cell. The vlookups are used to pull that data into the other worksheets.
I I save the workbook as an excel file it works great. I open the workbook and the data is populated appropriately.
If I save the workbook as a pdf the vlookups do not work. The pricing data is not populated. Below is a code snippet that demonstrates simply inserting one price and saving to pdf. I have attached the template.xslx file as well.
vartestWorkbook = new Workbook(@"C:\template.xlsx");
Good to know that your issue is resolved following the suggestion by Shakeel Faiz.
Also, whenever you need to update or insert values into the cells, you will always need to call Workbook.CaculateFormula() method before rendering to PDF, so the formulas are calculated based on the updated/inserted values.
Thanks, and have a good time!
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.