Export data from c++ to calc

I would like to export some data to calc like i did for Excel.

This is how i was doing it for Excel:

_ApplicationPtr pXL(L"Excel.Application");
WorkbooksPtr pBooks = pXL->Workbooks;
_WorkbookPtr pBook  = pBooks->Add((long)xlWorksheet);
_WorksheetPtr pSheet = pXL->ActiveSheet;
RangePtr pRange = pSheet->Cells;
pSheet->Name = "Table view";
...

Is there a way to do the same for Calc?

Yes you can, with a bit of code rework using the UNO API (see http://api.libreoffice.org/examples/examples.html#Cpp_examples).

Kind regards,
Joren