how to write in excel cells using DataReader if a particular cell is “ReadOnly” using C#
-
Hi, I am importing data to Excel sheets from Database. For this, I am using datareader. The excel sheet template has some macros and few formulae calculated and its not the normal excel worksheet. so I have to write the data into the excel sheet only if the particular cell is allowed to write. If not, the data shouldn't be imported. so, for this, I have a XML file which says from which column i should start writing and which row it should stop, I have done for many sheets. But in one sheet, I have first cell of the row is "readonly" and the rest are write access permitted. As, I get entire row from DB using Datareader, I am stuck up to write to other cells, except for the particular cell. I am attaching the code snippet for reference. \ Please help me in doing this. Sample :: if (reader.HasRows) { minRow = 0; minCol = 0; &