HelloWorld.cpp
// HelloWorld.cpp : main project file. #include "stdafx.h" using namespace System; using namespace System::IO; using namespace Bytescout::Spreadsheet; int main(array<System::String ^> ^args) { // Create new Spreadsheet Spreadsheet document; // Add new worksheet Worksheet^ worksheet = document.Workbook->Worksheets->Add("HelloWorld"); // Set cell value worksheet->Cell(0, 0)->Value = "Hello, World!"; // delete output file if exists already if (File::Exists("Output.xls")) { File::Delete("Output.xls"); } // Save document document.SaveAs("Output.xls"); // Close Spreadsheet document.Close(); System::Diagnostics::Process::Start("Output.xls"); return 0; }
stdafx.cpp
// stdafx.cpp : source file that includes just the standard includes // HelloWorld.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h"
Click here to get your Free Trial version of the SDK
also available as: