Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())

#region Save
//Saving the workbook
FileStream outputStream = new FileStream(Path.GetFullPath("Output/Formula.xlsx"), FileMode.Create, FileAccess.Write);
workbook.SaveAs(outputStream);
workbook.SaveAs(Path.GetFullPath("Output/Formula.xlsx"));
#endregion

//Dispose streams
outputStream.Dispose();
}
{% endhighlight %}

Expand Down Expand Up @@ -163,12 +159,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())

#region Save
//Saving the workbook
FileStream outputStream = new FileStream(Path.GetFullPath("Output/Formula.xlsx"), FileMode.Create, FileAccess.Write);
workbook.SaveAs(outputStream);
workbook.SaveAs(Path.GetFullPath("Output/Formula.xlsx"));
#endregion

//Dispose streams
outputStream.Dispose();
}
{% endhighlight %}

Expand Down Expand Up @@ -261,12 +253,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())

#region Save
//Saving the workbook
FileStream outputStream = new FileStream(Path.GetFullPath("Output/Formula.xlsx"), FileMode.Create, FileAccess.Write);
workbook.SaveAs(outputStream);
workbook.SaveAs(Path.GetFullPath("Output/Formula.xlsx"));
#endregion

//Dispose streams
outputStream.Dispose();
}
{% endhighlight %}

Expand Down Expand Up @@ -344,12 +332,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())

#region Save
//Saving the workbook
FileStream outputStream = new FileStream(Path.GetFullPath("Output/Formula.xlsx"), FileMode.Create, FileAccess.Write);
workbook.SaveAs(outputStream);
workbook.SaveAs(Path.GetFullPath("Output/Formula.xlsx"));
#endregion

//Dispose streams
outputStream.Dispose();
}
//Output

Expand Down Expand Up @@ -469,12 +453,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())

#region Save
//Saving the workbook
FileStream outputStream = new FileStream(Path.GetFullPath("Output/Formula.xlsx"), FileMode.Create, FileAccess.Write);
workbook.SaveAs(outputStream);
workbook.SaveAs(Path.GetFullPath("Output/Formula.xlsx"));
#endregion

//Dispose streams
outputStream.Dispose();
}
{% endhighlight %}

Expand Down Expand Up @@ -537,12 +517,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())

#region Save
//Saving the workbook
FileStream outputStream = new FileStream(Path.GetFullPath("Output/Formula.xlsx"), FileMode.Create, FileAccess.Write);
workbook.SaveAs(outputStream);
workbook.SaveAs(Path.GetFullPath("Output/Formula.xlsx"));
#endregion

//Dispose streams
outputStream.Dispose();
}
{% endhighlight %}

Expand Down Expand Up @@ -615,12 +591,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())

#region Save
//Saving the workbook
FileStream outputStream = new FileStream(Path.GetFullPath("Output/IncrementalFormula.xlsx"), FileMode.Create, FileAccess.Write);
workbook.SaveAs(outputStream);
workbook.SaveAs(Path.GetFullPath("Output/IncrementalFormula.xlsx"));
#endregion

//Dispose streams
outputStream.Dispose();
}
{% endhighlight %}

Expand Down Expand Up @@ -686,12 +658,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())

#region Save
//Saving the workbook
FileStream outputStream = new FileStream(Path.GetFullPath("Output/ExternalFormula.xlsx"), FileMode.Create, FileAccess.Write);
workbook.SaveAs(outputStream);
workbook.SaveAs(Path.GetFullPath("Output/ExternalFormula.xlsx"));
#endregion

//Dispose streams
outputStream.Dispose();
}
{% endhighlight %}

Expand Down Expand Up @@ -768,12 +736,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())

#region Save
//Saving the workbook
FileStream outputStream = new FileStream(Path.GetFullPath("Output/CalculatedColumn.xlsx"), FileMode.Create, FileAccess.Write);
workbook.SaveAs(outputStream);
workbook.SaveAs(Path.GetFullPath("Output/CalculatedColumn.xlsx"));
#endregion

//Dispose streams
outputStream.Dispose();
}
{% endhighlight %}

Expand Down Expand Up @@ -2098,10 +2062,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Use the function. The expected result is 30
sheet.Range["A3"].Formula = "AddInFunction(10,20)";

//Saving the workbook as stream
FileStream stream = new FileStream("AddIn.xlsx", FileMode.Create, FileAccess.ReadWrite);
workbook.SaveAs(stream);
stream.Dispose();
//Saving the workbook
workbook.SaveAs(Path.GetFullPath("Output/AddIn.xlsx"));
}
{% endhighlight %}

Expand Down Expand Up @@ -2251,12 +2213,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())

#region Save
//Saving the workbook
FileStream outputStream = new FileStream(Path.GetFullPath("Output/Formula.xlsx"), FileMode.Create, FileAccess.Write);
workbook.SaveAs(outputStream);
workbook.SaveAs(Path.GetFullPath("Output/Formula.xlsx"));
#endregion

//Dispose streams
outputStream.Dispose();
}
{% endhighlight %}

Expand Down Expand Up @@ -2362,22 +2320,17 @@ Following code illustrates on how to ignore or set error indicators.
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream);
application.DefaultVersion = ExcelVersion.Xlsx;
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
IWorksheet sheet = workbook.Worksheets[0];

//Sets warning if number is entered as text.
sheet.Range["A2:D2"].IgnoreErrorOptions = ExcelIgnoreError.NumberAsText;

#region Save
//Saving the workbook
FileStream outputStream = new FileStream(Path.GetFullPath("Output/FormulaAuditing.xlsx"), FileMode.Create, FileAccess.Write);
workbook.SaveAs(outputStream);
workbook.SaveAs(Path.GetFullPath("Output/FormulaAuditing.xlsx"));
#endregion

//Dispose streams
outputStream.Dispose();
}
{% endhighlight %}

Expand Down Expand Up @@ -2455,12 +2408,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())

#region Save
//Saving the workbook
FileStream outputStream = new FileStream(Path.GetFullPath("Output/CalculationMode.xlsx"), FileMode.Create, FileAccess.Write);
workbook.SaveAs(outputStream);
workbook.SaveAs(Path.GetFullPath("Output/CalculationMode.xlsx"));
#endregion

//Dispose streams
outputStream.Dispose();
}
{% endhighlight %}

Expand Down Expand Up @@ -2551,12 +2500,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())

#region Save
//Saving the workbook
FileStream outputStream = new FileStream(Path.GetFullPath("Output/Iteration.xlsx"), FileMode.Create, FileAccess.Write);
workbook.SaveAs(outputStream);
workbook.SaveAs(Path.GetFullPath("Output/Iteration.xlsx"));
#endregion

//Dispose streams
outputStream.Dispose();
}
{% endhighlight %}

Expand Down