PDA

View Full Version : New features...



jpujolf
22nd October 2008, 09:32
Hi all,

I don't know if this is an OT, so you have to decide...

I'm working for a company that makes his own ERPP, developing a kind of framework to develop quickly ERP software. Standard forms, loading from .ui files, highly configurable, external SQL querys, plugins, etc.

Usually my client deals with a LOT of data and wants to do data mining.

I've made a grid-like object, based on a QTreeView,but with "hormones" ;), very powerful & flexible that allows them to load about 8000 rows / 30 columns in 5 seconds and inspect data quickly, fully-colored, grouped, sorted, ...

They want to export that data to Excel, and by now i only have two solutions :

- CSV export ( I lose color info, needed to clarify large amounts of data )
- Excel 5.0 library I've found ( arggghhh, is the hell !! ). It has a lot of limitations and is an old & closed format. Yes, it sucks

When I noticed QT guys where developing and ODF writer ( initially closed to text files ) I thought that it will be easy for them to create an QAbstractViewWriter, allowing grids & trees to be dumped to an ODS file.

I asked them & they opened a task ( #226471 ). By now is only in pending status, but if someone thinks that could be a good idea to have that kind of ODF files generator, could vote in task tracker ( must be customer ) to send a message to them like "hey guys, it's a god idea. Why not implement this ?"

Thank you very much,

Jordi.

spud
22nd October 2008, 12:12
As a workaround, how about exporting to xml. That way you could create a document template in Excel, with all the different styles, and formats you need and just fill in the actual content.
Assuming that your tables all share a similar format, you could use a static header and footer and just fill in your relevant rows.
I'm attaching a simple example file.
The format for a row would be something like:


out << "<Row>";
for(int i=0;i<nrOfCols;i++)
out << QString("<Cell %1><Data %2>%3</Data></Cell>").arg(style).arg(format).arg(data);
out << "</Row>";

jpujolf
22nd October 2008, 12:24
Assuming that your tables all share a similar format, you could use a static header and footer and just fill in your relevant rows.


Sorry, bad assumption. Tables are different ( column number, colors, etc. )

I've tried to generate XML excel files but loading a large file is toooooo slow in M$ Excel that I discarded that option !!

Anyway, thanks for your answer...