static void example_read_write(char* from, char* to) { cout << "read " << from << endl; BasicExcel xls(from); XLSFormatManager fmt_mgr(xls); BasicExcelWorksheet* sheet = xls.GetWorksheet((size_t)0); CellFormat fmt_general(fmt_mgr); fmt_general.set_format_string(XLS_FORMAT_GENERAL); for(int y=0; y<33; ++y) { for(int x=1; x<2; ++x) { cout << y << "/" << x; BasicExcelCell* cell = sheet->Cell(y, x); CellFormat fmt(fmt_mgr, cell); // cout << " - xf_idx=" << cell->GetXFormatIdx(); const Workbook::Font& font = fmt_mgr.get_font(fmt); string font_name = stringFromSmallString(font.name_); cout << " font name: " << font_name; const wstring& fmt_string = fmt.get_format_string(); cout << " format: " << narrow_string(fmt_string) << " "; cell->SetFormat(fmt_general); cout << setw(10) << *(sheet->Cell(y,x)) << endl; } } cout << "write: " << from << endl; xls.SaveAs(to); }
char str = cell->GetString();
char* str = cell->GetString();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)