Recent

Author Topic: Office xml formats  (Read 17234 times)

timppl

  • Jr. Member
  • **
  • Posts: 80
Office xml formats
« on: April 06, 2013, 11:18:58 am »
Hi All

I am about to start work on creating a library to produce OOXML and ODF documents. My intention is to do all the work within this library so I do not need to link to any other external library.
 Although I am doing this as a fun project to 'scratch an itch', I will also be using it in a project at work, so I am looking at a timescale of about 3 to 6 months, and it will be released as open source.
At present I am not too sure how to structure it, eg whether to have some form of gui or keep it to ' background ' only, so any suggestions about interface, API, class structures and other software I can copy/modify code from will be very welcome.

Regards

Tim
Mageia 8 Linux on x86

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Office xml formats
« Reply #1 on: April 06, 2013, 11:28:07 am »
Why don't you contribute to my existing and already working library fpspreadsheet?

There are lots of tasks which need to be done, such as supporting more formulas, formatting options, etc.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Office xml formats
« Reply #2 on: April 06, 2013, 11:31:33 am »
http://wiki.lazarus.freepascal.org/fpXMLXSDExport
can directly write Access XML and Excel XML

http://wiki.lazarus.freepascal.org/FPSpreadsheet
can directly write OpenOffice XML (spreadsheet), MS Office XML (spreadsheet) and .xls binary

Starting with a library and a separate test program (whether gui or command line) would be my suggestion.
This can/should include unit tests as much as possible so you can check for regressions:
http://wiki.lazarus.freepascal.org/fpcunit

Edit: Felipe posted while I was writing this. I agree with his suggestion. You could take the structure of fpspreadsheet and create similar classes for Word,PowerPoint,Access code.

Additions/fixes to my fpXMLXSDExport code are more than welcome, too.



« Last Edit: April 06, 2013, 11:33:11 am by BigChimp »
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

timppl

  • Jr. Member
  • **
  • Posts: 80
Re: Office xml formats
« Reply #3 on: April 06, 2013, 12:49:12 pm »
Thanks for those replies

I had not realised that fpspreadsheet is so comprehensive. I have not tested it yet but going by the wiki page it looks very good, so I will get the svn version and have a play with it. I would probably look first at doing the word/OO writer stuff. Felipe, would you think it best  to add it to fpspreadsheet, or should I start a new fpdocument package?

I will have a play with fpXMLXSDExport as well.

Tim
Mageia 8 Linux on x86

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Office xml formats
« Reply #4 on: April 06, 2013, 02:11:55 pm »
I have 2 ideas about this:

1> To start a new fpdocument package. I had a plan to implement this some time ago, even had chosen the same name! But never had time and it ended up forgotten. Maybe now you will achieve this =) A lot of the structural code can be copied from fpspreadsheet, but I'd rather keep it separate from it, since we are talking really about 2 completely different things.

or

2> Expand fpvectorial to support more document oriented features. It is a library created originally for vectorial drawings, but since the beginning it has had PDF support which is a general document, and vectorial drawings are almost text documents anyway. Just add a rich text, a footer and a header entity and it should be almost ready.

The advantage of this method is that it would make the solution extremely flexible and capable of converting from PDF to Word and vice-versa for example.

fpvectorial already supports multiple pages per document, so structurally it is probably ready.

Plus, I work actively in fpvectorial, but I'm not sure if I would be able to contribute to a new package (already have too many to maintain)

mica

  • Full Member
  • ***
  • Posts: 196

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Office xml formats
« Reply #6 on: April 29, 2013, 08:35:58 am »
Hi Tim,

Any news on this? I'm interested to see what path you've chosen ;)

Thanks,
BigChimp
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

timppl

  • Jr. Member
  • **
  • Posts: 80
Re: Office xml formats
« Reply #7 on: April 30, 2013, 07:44:29 am »
Hi BigChimp

Yes I am still working on this ( in between working on my implementation of CategoryPanels and CategoryButtons ). I have created classes for most of the basic types in ODF and I can read in .odt files. I can write an empty .odt file and am working on adding content ( sort of important  :) ).
The user API is slowly evolving as well. I am expecting to have basic  functionality within a couple of weeks.
I will then be looking for a public repository to house it ( and the category panel/buttons )
Any suggestions on repos to use will be welcome.

Regards

Tim
 
Mageia 8 Linux on x86

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Office xml formats
« Reply #8 on: April 30, 2013, 08:06:21 am »
Hi Tim,

Thanks for the update.

Good news about your progress ;) And yes... content is important... sometimes ;)

If possible, I'd put it with fpspreadsheet (in the CCR repositories on sourceforge). Just give Vincent Snijders a PM if you're ready.

Temporarily though, you could put it up on bitbucket, github, Google Code, etc. I personnally use mercurial/hg and bitbucket (you can also use git).
If you intend to put it on laz ccr, which is mostly subversion-based, perhaps some repo that offers subversion hosting is best... though I don't know any by heart.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

ideabrush

  • New Member
  • *
  • Posts: 24
TCategoryPanel (was Re: Office xml formats)
« Reply #9 on: July 31, 2013, 11:51:54 am »
Hi Tim, I wonder if you've got TCategoryPanels implemented already.I have a Delphi project that uses it, and hope to convert it to Lazarus. Thank you!

timppl

  • Jr. Member
  • **
  • Posts: 80
Re: Office xml formats
« Reply #10 on: August 06, 2013, 07:55:34 am »
@ideabrush
Sorry for the delay in replying, I have been on holiday.  I have Category panels and buttons sort of working. Trouble is I dont have and have never seen delphi so dont really know how it is supposed to work and the embarcadero pages are not very clear.
Due to time constraints I stopped working on them and rewrote the app I am porting so it no longer needs them.
However you are welcome to the code if you want to see how it works for you.

Tim
Mageia 8 Linux on x86

ideabrush

  • New Member
  • *
  • Posts: 24
Re: Office xml formats
« Reply #11 on: August 06, 2013, 08:04:28 am »
Thanks for your reply, Tim. It'd be great if you can put what you currently have online someewhere like BigChimp suggested so that others could build on top of it.  :)

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Office xml formats
« Reply #12 on: August 06, 2013, 09:49:27 am »
It might interrest people here that in the mean time I am starting document support in fpvectorial, I am implementing ODT writing support now.

dgaspary

  • Jr. Member
  • **
  • Posts: 55
Re: Office xml formats
« Reply #13 on: August 19, 2013, 08:14:36 pm »
Felipe,

   I start developing support to ODF too. ODT as the main focus.

   My mistake, I have not shared the code in advance.

   Well, can we talk about this topic? I believe some sort of chat would be better. Do you use to connect at IRC channel ?

   Thank you.

dgaspary

  • Jr. Member
  • **
  • Posts: 55
Re: Office xml formats
« Reply #14 on: August 19, 2013, 08:54:53 pm »
Tim,

   I believe I could help you with the code. Are you sharing the code at any public service, github, google code.. ?

   A mini conference at IRC would be interesting.

 

TinyPortal © 2005-2018