Guest User

Untitled

a guest
Feb 18th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. excel.Application xlApp = new excel.Application();
  2. excel.Workbook xlWorkbook = xlApp.Workbooks.Add(Type.Missing);
  3. excel.Worksheet xlWorksheet = xlWorkbook.ActiveSheet;
  4. excel.Range xlRange = xlWorksheet.UsedRange;
  5. foreach (excel.Worksheet sheet in xlWorkbook.Worksheets)
  6. {
  7. string path = filepath;
  8. excel.Range pathrange = (excel.Range)sheet.Cells[1, 1];
  9.  
  10. pathrange.Formula = "=HYPERLINK("" + path + "", "" + path +
  11. "")";
  12. }
Add Comment
Please, Sign In to add comment