Skip to content
Merged
Show file tree
Hide file tree
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 @@ -14,14 +14,22 @@ static void Main(string[] args)
IWorkbook workbook = application.Workbooks.Create(1);
IWorksheet sheet = workbook.Worksheets[0];

//Fill 150 rows × 10,000 columns with boolean
for (int row = 1; row <= 150; row++)
int count = 0;

//Fill 100,000 rows × 50 columns with boolean
for (int row = 1; row <= 100000; row++)
{
for (int col = 1; col <= 10000; col++)
for (int column = 1; column <= 50; column++)
{
sheet[row, col].Boolean = (col % 2 == 0);
//Boolean
sheet.SetBoolean(row, column, count % 2 == 0);

count++;
}

}

workbook.SaveAs(@"../../../Output/Output.xlsx");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,23 @@ static void Main(string[] args)
IWorkbook workbook = application.Workbooks.Create(1);
IWorksheet sheet = workbook.Worksheets[0];

//Fill 150 rows × 10,000 columns with date
for (int row = 1; row <= 150; row++)
DateTime dateTime = new DateTime(1900, 1, 1);

//Fill 100,000 rows × 50 columns with date
for (int row = 1; row <= 100000; row++)
{
for (int col = 1; col <= 10000; col++)
for (int column = 1; column <= 50; column++)
{
sheet[row, col].DateTime = new DateTime(2025, 1, 1).AddDays(col);

//Date Time set method
sheet.SetValue(row, column, dateTime.ToString(), "mm/dd/yyyy");

}
dateTime = dateTime.AddDays(1);
}


workbook.SaveAs(@"../../../Output/Output.xlsx");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ static void Main(string[] args)
IWorkbook workbook = application.Workbooks.Create(1);
IWorksheet sheet = workbook.Worksheets[0];

//Fill 150 rows × 10,000 columns with formula
for (int row = 1; row <= 150; row++)
//Fill 100,000 rows × 50 columns with formula
for (int row = 2; row <= 100000; row++)
{
for (int col = 1; col <= 10000; col++)
for (int column = 1; column <= 50; column++)
{
sheet[row, col].Formula = $"=SUM({row},{col})";
sheet.SetFormula(row, column, "IF(A1>10,SUM(A1,10),10)");
}
}

workbook.SaveAs(@"../../../Output/Output.xlsx");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,25 @@ static void Main(string[] args)
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
IWorkbook workbook = application.Workbooks.Create(1);

//Access the first worksheet which contains data
IWorksheet sheet = workbook.Worksheets[0];

//Fill 150 rows × 10,000 columns with number
for (int row = 1; row <= 150; row++)
int count = 0;

//Fill 100,000 rows × 50 columns with number
for (int row = 1; row <= 100000; row++)
{
for (int col = 1; col <= 10000; col++)
for (int column = 1; column <= 50; column++)
{
sheet[row, col].Number = row * col;
//Number set method
sheet.SetNumber(row, column, count);

count++;
}
}

workbook.SaveAs(@"../../../Output/Output.xlsx");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.IO;
using Syncfusion.XlsIO;
using Syncfusion.XlsIO;
using System.IO;
using static System.Net.WebRequestMethods;

namespace String_Data_Type
{
Expand All @@ -13,15 +14,20 @@ static void Main(string[] args)
application.DefaultVersion = ExcelVersion.Xlsx;
IWorkbook workbook = application.Workbooks.Create(1);
IWorksheet sheet = workbook.Worksheets[0];

//Fill 150 rows × 10,000 columns with string
for (int row = 1; row <= 150; row++)

int count = 0;
// Fill 100,000 rows × 50 columns with string
for (int row = 1; row <= 100000; row++)
{
for (int col = 1; col <= 10000; col++)
for (int column = 1; column <= 50; column++)
{
sheet[row, col].Text = $"R{row}C{col}";

sheet.SetText(row, column, "One" + count);

count++;
}
}
workbook.SaveAs(@"../../../Output/Output.xlsx");
}
}
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,25 @@ static void Main(string[] args)
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
FileStream fileStream = new FileStream(Path.GetFullPath(@"../../../Data/Input.xlsx"), FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(fileStream);

//Dispose streams
fileStream.Dispose();
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"../../../Data/Input.xlsx"));

//Access the first worksheet which contains data
IWorksheet sheet = workbook.Worksheets[0];

IRange usedRange = sheet.UsedRange;

int firstRow = usedRange.Row;
int lastRow = usedRange.LastRow;
int firstcolumn = usedRange.Column;
int lastcolumn = usedRange.LastColumn;
for (int row = firstRow; row <= lastRow; row++)
{
for (int column = firstcolumn; column <= lastcolumn; column++)
{
var value = sheet.GetCellValue(row, column, false);
}
}
}
}
}
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,24 @@ static void Main(string[] args)
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;


FileStream fileStream = new FileStream(Path.GetFullPath(@"../../../Data/Input.xlsx"), FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(fileStream);

//Dispose streams
fileStream.Dispose();
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"../../../Data/Input.xlsx"));

//Access the first worksheet which contains data
IWorksheet sheet = workbook.Worksheets[0];

IRange usedRange = sheet.UsedRange;

int firstRow = usedRange.Row;
int lastRow = usedRange.LastRow;
int firstcolumn = usedRange.Column;
int lastcolumn = usedRange.LastColumn;
for (int row = firstRow; row <= lastRow; row++)
{
for (int column = firstcolumn; column <= lastcolumn; column++)
{
var value = sheet.GetCellValue(row, column, false);
}
}
}
}
}
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,24 @@ static void Main(string[] args)
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
FileStream fileStream = new FileStream(Path.GetFullPath(@"../../../Data/Input.xlsx"), FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(fileStream);
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"../../../Data/Input.xlsx"));

//Dispose streams
fileStream.Dispose();
//Access the first worksheet which contains data
IWorksheet sheet = workbook.Worksheets[0];

IRange usedRange = sheet.UsedRange;

int firstRow = usedRange.Row;
int lastRow = usedRange.LastRow;
int firstcolumn = usedRange.Column;
int lastcolumn = usedRange.LastColumn;
for (int row = firstRow; row <= lastRow; row++)
{
for (int column = firstcolumn; column <= lastcolumn; column++)
{
var value = sheet.GetCellValue(row, column, false);
}
}
}
}
}
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,24 @@ static void Main(string[] args)
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
FileStream fileStream = new FileStream(Path.GetFullPath(@"../../../Data/Input.xlsx"), FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(fileStream);
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"../../../Data/Input.xlsx"));

//Dispose streams
fileStream.Dispose();
//Access the first worksheet which contains data
IWorksheet sheet = workbook.Worksheets[0];

IRange usedRange = sheet.UsedRange;

int firstRow = usedRange.Row;
int lastRow = usedRange.LastRow;
int firstcolumn = usedRange.Column;
int lastcolumn = usedRange.LastColumn;
for (int row = firstRow; row <= lastRow; row++)
{
for (int column = firstcolumn; column <= lastcolumn; column++)
{
var value = sheet.GetCellValue(row, column, false);
}
}
}
}
}
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,24 @@ static void Main(string[] args)
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
FileStream fileStream = new FileStream(Path.GetFullPath(@"../../../Data/Input.xlsx"), FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(fileStream);
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"../../../Data/Input.xlsx"));

//Dispose streams
fileStream.Dispose();
//Access the first worksheet which contains data
IWorksheet sheet = workbook.Worksheets[0];

IRange usedRange = sheet.UsedRange;

int firstRow = usedRange.Row;
int lastRow = usedRange.LastRow;
int firstcolumn = usedRange.Column;
int lastcolumn = usedRange.LastColumn;
for (int row = firstRow; row <= lastRow; row++)
{
for (int column = firstcolumn; column <= lastcolumn; column++)
{
var value = sheet.GetCellValue(row, column, false);
}
}
}
}
}
Expand Down

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.
Loading