I use excellibrary library in working with excel. My code is
Workbook book = Workbook.Load(book_name);
Workbook book_new = Workbook.Load(file_name);
Worksheet sheet = book.Worksheets[0];
Worksheet sheet_new = book_new.Worksheets[0];
for (int rowIndex = 7; rowIndex <= 2235; rowIndex++)
{
Console.WriteLine(sheet.Cells[rowIndex, ost_index] + " " + sheet_new.Cells[rowIndex, ost_index]);
sheet.Cells[rowIndex, ost_index] = sheet_new.Cells[rowIndex, ost_index];
sheet.Cells[rowIndex, price_index] = sheet_new.Cells[rowIndex, price_index];
}
book.Save(book_name);
In this code I copy two cols from one file to another. And there is a problem. this excel file has a lot of style like hyperlink etc. When I open the file after using program I see a window with the text Unable to read file. After clicking "ok... ok... ok..." I see file without formatting(no color, no style and so on). How can I repair it? P.S. sorry for my English.