I have created an excelsheet using interoperabilty.I need to add array in to the first position and all other column need to move
this is how i tried and not working.any way?
Excel.Range rng = xlWorkSheet.get_Range("A1", misValue);
string[] result = File.ReadAllLines(path);
rng.Value2 = result;
rng.EntireColumn.Insert(Excel.XlInsertShiftDirection.xlShiftToRight,
Excel.XlInsertFormatOrigin.xlFormatFromRightOrBelow);
Leon DPosted Dec 13, 2021, 1:13 AM
You can use Free Spire.XLS library to insert array into an Excel worksheet.
Here is a basic example:
For more information, check this link:
https://www.e-iceblue.com/Tutorials/Spire.XLS/Spire.XLS-Program-Guide/Set-an-Array-of-Values-into-a-Range-in-Excel-Worksheet.html
Srinivasan RamamoorthiPosted Dec 12, 2021, 1:13 PM