Relative Content

Tag Archive for c#excel

C# copy excel dropdown list

I have an already created dropdown list in cell A2. I want to use C# code to get that dropdown list from A2 and copy it to B2.

C#: Keep leading zeros when exporting grid data to Excel

I’m trying to figure out how to keep the leading 0’s when exporting data from a grid to Excel, either by manipulating the value of each cell or setting a format for the entire column.
I found several suggestion to add “t” in front of the value, but this doesn’t have any effect.
The only solution I’ve found so far is to add an apostrophe in front of the value, and that works, but I really don’t want the ‘ in the excel file.