Skip to content

Instantly share code, notes, and snippets.

View AsposeCellsBlog's full-sized avatar

AsposeCellsBlog AsposeCellsBlog

  • http://products.aspose.com/cells/
View GitHub Profile
@AsposeCellsBlog
AsposeCellsBlog / Copy_Excel_Range_to_Different_Worksheet.cs
Created November 22, 2018 07:36
Copy Excel Range to Different Worksheet - C#
// Load sample Excel file inside workbook object.
Aspose.Cells.Workbook wb = new Aspose.Cells.Workbook("sampleExcelRange.xlsx");
// Access first worksheet containing the source range.
Worksheet ws = wb.Worksheets[0];
// Access second worksheet where source range to be copied.
Worksheet ws2 = wb.Worksheets[1];
// Create source range object.
@AsposeCellsBlog
AsposeCellsBlog / Copy_Excel_Range_to_Same_Worksheet.cs
Created November 22, 2018 07:33
Copy Excel Range to Same Worksheet - C#
// Load sample Excel file inside workbook object.
Aspose.Cells.Workbook wb = new Aspose.Cells.Workbook("sampleExcelRange.xlsx");
// Access first worksheet containing the source range.
Worksheet ws = wb.Worksheets[0];
// Create source range object.
Range srcRng = ws.Cells.CreateRange("B4:H8");
// Create destination range object.
@AsposeCellsBlog
AsposeCellsBlog / Convert_Microsoft_Excel_XLS_to_XLSX.cpp
Created November 16, 2018 17:15
Convert Microsoft Excel XLS to XLSX - C++
// Path of input XLS and output XLSX files.
intrusive_ptr<Aspose::Cells::System::String> inputXLSFile = new Aspose::Cells::System::String("D:/Download/SampleConvertMicrosoftExcelXLSToXLSX.xls");
intrusive_ptr<Aspose::Cells::System::String> outputXLSXFile = new Aspose::Cells::System::String("D:/Download/OutputConvertMicrosoftExcelXLSToXLSX.xlsx");
// Specify load options Excel97To2003 i.e. XLS format.
intrusive_ptr<Aspose::Cells::ILoadOptions> opts = Aspose::Cells::Factory::CreateILoadOptions(Aspose::Cells::LoadFormat_Excel97To2003);
// Load the input XLS file inside the Aspose.Cells workbook object.
intrusive_ptr<Aspose::Cells::IWorkbook> wb = Aspose::Cells::Factory::CreateIWorkbook(inputXLSFile, opts);
@AsposeCellsBlog
AsposeCellsBlog / Convert_TSV_to_XLSB_format.java
Created November 16, 2018 16:27
Convert TSV to XLSB format - Java
// Directory path for input and output files.
String dirPath = "D:\\Download\\";
// Specify that you want to load TSV file.
LoadOptions opts = new LoadOptions(LoadFormat.TSV);
// Load your sample TSV file inside the Workbook object using specified LoadOptions.
com.aspose.cells.Workbook wb = new Workbook(dirPath + "sampleConvertTSVToExcelFormats.tsv", opts);
// Save TSV file to XLSB format.
@AsposeCellsBlog
AsposeCellsBlog / Convert_TSV_to_XLSM_format.java
Created November 16, 2018 16:24
Convert TSV to XLSM format - Java
// Directory path for input and output files.
String dirPath = "D:\\Download\\";
// Specify that you want to load TSV file.
LoadOptions opts = new LoadOptions(LoadFormat.TSV);
// Load your sample TSV file inside the Workbook object using specified LoadOptions.
com.aspose.cells.Workbook wb = new Workbook(dirPath + "sampleConvertTSVToExcelFormats.tsv", opts);
// Save TSV file to XLSM format.
@AsposeCellsBlog
AsposeCellsBlog / Convert_TSV_to_XLSX_format.java
Created November 16, 2018 16:23
Convert TSV to XLSX format - Java
// Directory path for input and output files.
String dirPath = "D:\\Download\\";
// Specify that you want to load TSV file.
LoadOptions opts = new LoadOptions(LoadFormat.TSV);
// Load your sample TSV file inside the Workbook object using specified LoadOptions.
com.aspose.cells.Workbook wb = new Workbook(dirPath + "sampleConvertTSVToExcelFormats.tsv", opts);
// Save TSV file to XLSX format.
@AsposeCellsBlog
AsposeCellsBlog / Convert_TSV_to_XLS_format.java
Created November 16, 2018 16:22
Convert TSV to XLS format - Java
// Directory path for input and output files.
String dirPath = "D:\\Download\\";
// Specify that you want to load TSV file.
LoadOptions opts = new LoadOptions(LoadFormat.TSV);
// Load your sample TSV file inside the Workbook object using specified LoadOptions.
com.aspose.cells.Workbook wb = new Workbook(dirPath + "sampleConvertTSVToExcelFormats.tsv", opts);
// Save TSV file to XLS format.
@AsposeCellsBlog
AsposeCellsBlog / Convert_TSV_to_XLSB_format.cs
Created November 16, 2018 16:06
Convert TSV to XLSB format - C#
// Directory path for input and output files.
string dirPath = "D:\\Download\\";
// Specify that you want to load TSV file.
LoadOptions opts = new LoadOptions(LoadFormat.TSV);
// Load your sample TSV file inside the Workbook object using specified LoadOptions.
Aspose.Cells.Workbook wb = new Aspose.Cells.Workbook(dirPath + "sampleConvertTSVToExcelFormats.tsv", opts);
// Save TSV file to XLSB format.
@AsposeCellsBlog
AsposeCellsBlog / Convert_TSV_to_XLSM_format.cs
Created November 16, 2018 16:05
Convert TSV to XLSM format - C#
// Directory path for input and output files.
string dirPath = "D:\\Download\\";
// Specify that you want to load TSV file.
LoadOptions opts = new LoadOptions(LoadFormat.TSV);
// Load your sample TSV file inside the Workbook object using specified LoadOptions.
Aspose.Cells.Workbook wb = new Aspose.Cells.Workbook(dirPath + "sampleConvertTSVToExcelFormats.tsv", opts);
// Save TSV file to XLSM format.
@AsposeCellsBlog
AsposeCellsBlog / Convert_TSV_to_XLSX_format.cs
Created November 16, 2018 16:04
Convert TSV to XLSX format - C#
// Directory path for input and output files.
string dirPath = "D:\\Download\\";
// Specify that you want to load TSV file.
LoadOptions opts = new LoadOptions(LoadFormat.TSV);
// Load your sample TSV file inside the Workbook object using specified LoadOptions.
Aspose.Cells.Workbook wb = new Aspose.Cells.Workbook(dirPath + "sampleConvertTSVToExcelFormats.tsv", opts);
// Save TSV file to XLSX format.