Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i've done excel export using OpenXml instead of excel objects.

I've Sheet1 and sheet2.In sheet one i have dropdown list in column "C1",where i used the source data from sheet2 . Now i want to delete/hide sheet2 while exporting excel sheet without effecting dropdown data.

When i tried below code sheet2 has been deleted but i dint get any data in my dropdown.

C#
var theSheet = workbookPart.Workbook.Descendants<DocumentFormat.OpenXml.Spreadsheet.Sheet>()
                               .FirstOrDefault(s => s.Id == relId1);
theSheet.Remove();
workbookPart.DeletePart(worksheetPart);


Kindly Lemme know if any other way for making it without effecting ddl.

thanks in advance.
Posted
Updated 23-Nov-15 22:11pm
v3

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900