Skip to content

Instantly share code, notes, and snippets.

@conholdate-gists
conholdate-gists / Excel-to-CSV.java
Created May 6, 2024 07:12
Convert Excel XLS XLSX to CSV in Java
// Load the input Excel file
com.aspose.cells.Workbook workbook = new com.aspose.cells.Workbook("Excel.xlsx");
// Convert XLSX to CSV file
workbook.save("ExcelToCSV.csv", com.aspose.cells.SaveFormat.CSV);
@conholdate-gists
conholdate-gists / Excel-to-CSV.cs
Created May 6, 2024 07:11
Convert Excel XLS XLSX to CSV in C# .NET
// Load the input Excel file
Workbook workbook = new Workbook("Excel.xlsx");
// Convert XLSX to CSV file
workbook.Save("ExcelToCSV.csv", Aspose.Cells.SaveFormat.Csv);
@conholdate-gists
conholdate-gists / convert-stl-to-obj.cs
Created April 27, 2024 01:56
Convert STL to OBJ in C# .NET or Java
// Initialize an object of Scene class
Aspose.ThreeD.Scene scene = new Aspose.ThreeD.Scene();
// Load input STL file with Open method
scene.Open("test.stl");
// Specify the output format for the Wavefront OBJ file
Aspose.ThreeD.FileFormat outputformat = Aspose.ThreeD.FileFormat.WavefrontOBJ;
// Convert STL to OBJ Object file
@conholdate-gists
conholdate-gists / compress-word-documents.cs
Created April 16, 2024 21:27
Compress Word Documents in C# | DOC DOCX Compressor
// Load input Word document
Aspose.Words.Document doc = new Aspose.Words.Document("input.docx");
// Create an object of OoxmlSaveOptions class
Aspose.Words.Saving.OoxmlSaveOptions saveOptions = new Aspose.Words.Saving.OoxmlSaveOptions(Aspose.Words.SaveFormat.Docx);
// Use Super Fast compression level for faster and weaker compression
saveOptions.CompressionLevel = Aspose.Words.Saving.CompressionLevel.SuperFast;
// Save compressed Word DOCX document
@conholdate-gists
conholdate-gists / convert-fbx-to-obj.cs
Created April 15, 2024 20:53
Convert FBX to OBJ Online for Free | FBX to OBJ in C# or Java
string inputFile ="file.fbx";
using (Image image = Image.Load(inputFile))
{
// Initialize ObjOptions class object
ObjOptions options = new ObjOptions();
// Export FBX to OBJ
string outPath = "output.obj";
image.Save(outPath, options);
}
@conholdate-gists
conholdate-gists / convert-pdf-to-mobi-xml.java
Created March 27, 2024 00:50
Convert PDF to XML in Java | PDF to XML Converter
// Load PDF document
Document document = new Document("input.pdf");
// Convert PDF to XML format
document.save("output.xml", com.aspose.pdf.SaveFormat.MobiXml);
@conholdate-gists
conholdate-gists / convert-excel-to-json-advanced.cs
Created March 22, 2024 09:59
Convert Excel XLSX XLS to JSON in C# .NET
// Load Excel file
Workbook wb = new Workbook("Workbook.xlsx");
// Create JsonSaveOptions class object
Aspose.Cells.JsonSaveOptions options = new Aspose.Cells.JsonSaveOptions();
options.SkipEmptyRows = true;
options.ExportAsString = true;
// Save as JSON
wb.Save("Excel_to_JSON.json", options);
@conholdate-gists
conholdate-gists / convert-3mf-to-stl.cs
Created March 20, 2024 09:18
Convert 3MF to STL File Online for Free - Create 3MF to STL Converter in C# or Java
// Load the input 3MF file
var scene = Aspose.ThreeD.Scene.FromFile("cylinder.3mf");
// Create an object of StlSaveOptions class
Aspose.ThreeD.Formats.StlSaveOptions options = new Aspose.ThreeD.Formats.StlSaveOptions();
// Convert 3MF to STL
scene.Save("3MFtoSTL.stl", options);
@conholdate-gists
conholdate-gists / Convert-DOCX-to-PPTX.java
Created March 18, 2024 20:01
Convert DOCX to PPTX in Java | Word DOC DOCX Document to Presentation Converter
// Load the source DOCX file
com.groupdocs.conversion.Converter converter = new com.groupdocs.conversion.Converter("sample.docx");
// Create an object of PresentationConvertOptions class
com.groupdocs.conversion.options.convert.PresentationConvertOptions options = new com.groupdocs.conversion.options.convert.PresentationConvertOptions();
// Convert Word DOCX to PPTX Presentation
converter.convert("Presentation.pptx", options);
@conholdate-gists
conholdate-gists / Convert-HTML-to-PPTX.java
Created March 14, 2024 12:31
Convert HTML to PPTX Presentation Slides in Java
// Initialize an HTML document from the file
var document = new com.aspose.html.HTMLDocument("spring.html");
// Initialize PdfSaveOptions
var options = new com.aspose.html.saving.PdfSaveOptions();
// Convert HTML to PDF
com.aspose.html.converters.Converter.convertHTML(document, options, "spring-output.pdf");
// Load PDF document