产å“é¡µé¢ | 文档 | 演示 | API å‚考 | 示例 | åšå®¢ | å‘布 | å…è´¹æ”¯æŒ | 临时许å¯è¯
Aspose.Cells for C++ 是一个原生的C++库,å¯ä»¥åœ¨ä¸éœ€è¦ä½¿ç”¨Microsoft Office或自动化的情况下创建,æ“作,处ç†å’Œè½¬æ¢Microsoft Excel?文件。Excel C++ API支æŒExcel 97-2003(XLS),Excel 2007-2013/2016(XLSX,XLSM,XLSB),OpenOffice XMLå’Œå…¶ä»–æ ¼å¼ï¼Œå¦‚CSV,TSVç‰ã€‚
它å…许开å‘人员从他们自己的C++应用程åºä¸å¤„ç†ç”µåè¡¨æ ¼è¡Œã€åˆ—ã€æ•°æ®ã€å…¬å¼ã€æ•°æ®é€è§†è¡¨ã€å·¥ä½œè¡¨ã€è¡¨æ ¼ã€å›¾è¡¨å’Œç»˜å›¾å¯¹è±¡ã€‚
Aspose.Cells for C++ 是一个原生的C++本地API,用于将电åè¡¨æ ¼åˆ›å»ºï¼Œæ“作和转æ¢åŠŸèƒ½é›†æˆåˆ°æ‚¨çš„C++应用ä¸ã€‚它支æŒä¸Žæ¥è‡ªMicrosoft Excel(XLS,XLSX,XLSB,CSVç‰ï¼‰å’ŒOpenOffice/LibreOffice(ODS)的许多æµè¡Œç”µåè¡¨æ ¼æ–‡ä»¶æ ¼å¼ä¸€èµ·å·¥ä½œã€‚
您å¯ä»¥åœ¨æ”¯æŒC++的任何开å‘环境(如Microsoft Visual Studio)ä¸ä½¿ç”¨ Aspose.Cells for C++ å¼€å‘64ä½åº”用程åºã€‚ Aspose.Cells for C++ 是本地组件,å¯ä»¥é€šè¿‡ç®€å•åœ°å¤åˆ¶éƒ¨ç½²ã€‚ 您ä¸å¿…担心其他æœåŠ¡æˆ–模å—。
Aspose.Cells for C++ å…许您处ç†Microsoft Excelä¸çš„内置和自定义文档属性。支æŒå°†Excel工作簿高质é‡åœ°è½¬æ¢ä¸ºç¬¦åˆPDF/Aæ ‡å‡†çš„æ–‡ä»¶ã€‚å¤„ç†å…¬å¼ï¼Œæ•°æ®é€è§†è¡¨ï¼Œå·¥ä½œè¡¨ï¼Œè¡¨ï¼ŒèŒƒå›´ï¼Œå›¾è¡¨ï¼ŒOLE对象ç‰ã€‚
Microsoft Excel: XLS, XLSX, XLSB, SpreadsheetML
Text: CSV, TSV, TabDelimited
OpenDocument: ODS
其他: HTMLã€MHTML
Microsoft Excel: XLSM, XLTX, XLTM, XLAM
便æºå¼æ–‡æ¡£æ ¼å¼: PDFã€XPS
Text: CSV, TSV, TabDelimited
图åƒ: SVGã€JPEGã€PNGã€BMPã€GIF
Web: HTML, MHTML
元文件: EMF
其它 DIF
您准备好å°è¯• Aspose.Cells for C++ 了å—?åªéœ€åœ¨Visual Studio的包管ç†å™¨æŽ§åˆ¶å°ä¸æ‰§è¡Œ Install-Package Aspose.Cells.Cpp
æ¥èŽ·å–NuGet包。如果您已ç»å®‰è£…了 Aspose.Cells for C++ 并想è¦å‡çº§ç‰ˆæœ¬ï¼Œè¯·æ‰§è¡Œ Update-Package Aspose.Cells.Cpp
æ¥èŽ·å–最新版本。
å°è¯•æ‰§è¡Œä»¥ä¸‹ä»£ç 片段以查看 API 在您的环境ä¸çš„工作方å¼ï¼Œæˆ–者查看 GitHub å˜å‚¨åº“ 了解其他常è§ç”¨æ³•åœºæ™¯ã€‚
U16String dir(u"your path");
// load the file to be converted
Workbook book(dir + u"template.xls");
// save in different formats
book.Save(dir + u"output.xlsx", SaveFormat::Xlsx);
book.Save(dir + u"output.xlsb", SaveFormat::Xlsb);
book.Save(dir + u"output.csv", SaveFormat::CSV);
book.Save(dir + u"output.json", SaveFormat::Json);
// create a new workbook
Workbook workbook;
// get first worksheet which is created by default
Worksheet worksheet = workbook.GetWorksheets().Get(0);
// add sample data
worksheet.GetCells().Get(u"A1").PutValue(50);
worksheet.GetCells().Get(u"A2").PutValue(100);
worksheet.GetCells().Get(u"A3").PutValue(150);
worksheet.GetCells().Get(u"A4").PutValue(110);
worksheet.GetCells().Get(u"B1").PutValue(260);
worksheet.GetCells().Get(u"B2").PutValue(12);
worksheet.GetCells().Get(u"B3").PutValue(50);
worksheet.GetCells().Get(u"B4").PutValue(100);
// add a chart to the worksheet
int chartIndex = worksheet.GetCharts().Add(Aspose::Cells::Charts::ChartType::Column, 5, 0, 20, 8);
// access the instance of the newly added chart
Chart chart = worksheet.GetCharts().Get(chartIndex);
// add SeriesCollection (chart data source) to the chart ranging from A1 to B4
chart.GetNSeries().Add(u"A1:B4", true);
// set the chart type of 2nd NSeries to display as line chart
chart.GetNSeries().Get(1).SetType(
Aspose::Cells::Charts::ChartType::Line);
// save the Excel file
workbook.Save(u"output.xlsx");
产å“é¡µé¢ | 文档 | 演示 | API å‚考 | 示例 | åšå®¢ | å‘布 | å…è´¹æ”¯æŒ | 临时许å¯è¯