Missing header files
Hi,
This is not complete solution, cant see any of the header files.
thanks,
Prasmit
#include "Workbook.h" #include "Worksheet.h" #include "Cell.h" using namespace FileScribe; int main(int argc, char **argv) { Workbook workbook(""); Worksheet* pWorksheet = workbook.GetWorksheetByIndex(0); for (uint16_t y = 0; y < 10; y++) { Cell* pCell = pWorksheet->GetCell(0,y); pCell->SetFloat(y*3.1417f); } pWorksheet->GetCellByAddress("B1")->SetString("http://numberduck.com"); pWorksheet->GetCellByAddress("B2")->SetBoolean(true); pWorksheet->GetCellByAddress("B3")->SetFormula("=SUM(A1:A10)"); workbook.Save("Spreadsheet.xls"); return 0; }
Workbook* pWorkbookIn = new Workbook(""); if (pWorkbookIn->Load("Spreadsheet.xls")) { Worksheet* pWorksheetIn = pWorkbookIn->GetWorksheetByIndex(0); Cell* pCellIn = pWorksheetIn->GetCell(0,0); if (pCellIn->GetType() == Cell::TYPE_FLOAT) printf("Cell Contents: %f\n", pCellIn->GetFloat()); }
Workbook workbook(""); Worksheet* pWorksheet = workbook.GetWorksheetByIndex(0); Style* pDefaultStyle = workbook.GetDefaultStyle(); pDefaultStyle->SetColor(Color(128, 128, 128)); Style* pStyle = workbook.CreateStyle(); pStyle->SetFont("Comic Sans MS"); pStyle->SetColor(Color(255, 0, 255)); pStyle->SetBackgroundColor(Color(255, 255, 0)); pStyle->SetItalic(true); pStyle->SetBold(true); Cell* pCell = pWorksheet->GetCellByAddress("A1"); pCell->SetString("Default style"); pCell = pWorksheet->GetCellByAddress("A2"); pCell->SetStyle(pStyle); pCell->SetString("This looks hideous!"); workbook.Save("Formatting.xls");
Workbook workbook(""); Worksheet* pWorksheet = workbook.GetWorksheetByIndex(0); Picture* pPicture = pWorksheet->CreatePicture("duck.png"); pPicture->SetX(1); pPicture->SetY(1); pPicture->SetSubX(10); pPicture->SetSubY(10); workbook.Save("Picture.xls");
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.
Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.
FOR YOUR OWN SAFETY, PLEASE:
1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.