We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Creating worksheet from a template worksheet.

Thread ID:

Created:

Updated:

Platform:

Replies:

124233 May 25,2016 07:16 PM UTC May 27,2016 06:32 AM UTC ASP.NET Web Forms (Classic) 3
loading
Tags: XlsIO
Mike Rosenberger
Asked On May 25, 2016 07:16 PM UTC

I have a template file, which i am creating multiple sheets of in a new Workbook.  All the data shows up fine but the data decides to format itself differently than what the template file is formatted for.  It changes font, sometime font size and weight, and reformats the cell number formatting. Below is my code on creating the sheet from the template.  Let me know if you need to see my entire class.



IApplication application = excelEngine.Excel;

//Open the template workbook
IWorkbook templateWorkbook = application.Workbooks.Open(path);
 
//Get the template worksheet
IWorksheet templateSheet = templateWorkbook.Worksheets[0];

//Open a workbook with a blank sheet
IWorkbook workBook = application.Workbooks.Open(blankPath);

//Copy the template sheet to the blank sheet workbook
IWorksheet sheet = workBook.Worksheets.AddCopy(templateSheet);

//move the sheet to the front of the line                
sheet.Move(0);

Sridhar Sukumar [Syncfusion]
Replied On May 26, 2016 08:43 AM UTC

 Hi Mike, 
  
Thank you for contacting Syncfusion support. 
We are unable to reproduce the reported issue from our side. We have shared the sample for your reference which can be downloaded from following location.  
Kindly modify the sample and share us the issue reproducing sample or input Excel file which will be helpful for us to provide prompt solution at the earliest. 
Regards 
Sridhar S 


Mike Rosenberger
Replied On May 26, 2016 01:03 PM UTC

I have taken the files you have sent me and modified it to use our templates and encounter the same issues.  It is changing some of the text to calibri from times now roman and un-centering some of the fields.  I included the edited code and documents.  You can look at the output file to see my results.

Attachment: Template_worksheetUpdated_99c6c25d.zip

Sridhar Sukumar [Syncfusion]
Replied On May 27, 2016 06:32 AM UTC

Hi Mike, 

  

We were able to reproduce the problem and have logged defect report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates 

  

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents  

  

Please let me know if you have any questions. 

 

Regards 

Sridhar S. 

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;