MSOffice DOCX generation?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

MSOffice DOCX generation?

Hannes Hirzel
Hello

Is there a library like for Pharo to generate DOCX files?

Something like this
https://docx.codeplex.com/
DocX is a .NET library that allows developers to manipulate Word
2007/2010/2013 files, in an easy and intuitive manor. DocX is fast,
lightweight and best of all it does not require Microsoft Word or
Office to be installed.

Regards

Hannes

Reply | Threaded
Open this post in threaded view
|

Re: MSOffice DOCX generation?

Hannes Hirzel
A similar library but for Java

http://www.docx4java.org/trac/docx4j

On 8/7/15, H. Hirzel <[hidden email]> wrote:

> Hello
>
> Is there a library like for Pharo to generate DOCX files?
>
> Something like this
> https://docx.codeplex.com/
> DocX is a .NET library that allows developers to manipulate Word
> 2007/2010/2013 files, in an easy and intuitive manor. DocX is fast,
> lightweight and best of all it does not require Microsoft Word or
> Office to be installed.
>
> Regards
>
> Hannes
>

Reply | Threaded
Open this post in threaded view
|

Re: MSOffice DOCX generation?

Hannes Hirzel
I found Tabular

http://ss3.gemtalksystems.com/ss/Tabular.html

which is for Spreadsheets files. It is useful as an example for
creating something similar for DOCX files.

On 8/8/15, H. Hirzel <[hidden email]> wrote:

> A similar library but for Java
>
> http://www.docx4java.org/trac/docx4j
>
> On 8/7/15, H. Hirzel <[hidden email]> wrote:
>> Hello
>>
>> Is there a library like for Pharo to generate DOCX files?
>>
>> Something like this
>> https://docx.codeplex.com/
>> DocX is a .NET library that allows developers to manipulate Word
>> 2007/2010/2013 files, in an easy and intuitive manor. DocX is fast,
>> lightweight and best of all it does not require Microsoft Word or
>> Office to be installed.
>>
>> Regards
>>
>> Hannes
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: MSOffice DOCX generation?

Vincent Blondeau
I think you can improve Tabular to generate DOCX files. It is the same file standard than XLSX.

Vincent

-----Message d'origine-----
De : Pharo-users [mailto:[hidden email]] De la part de H. Hirzel
Envoyé : samedi 8 août 2015 08:56
À : Any question about pharo is welcome
Objet : Re: [Pharo-users] MSOffice DOCX generation?

I found Tabular

http://ss3.gemtalksystems.com/ss/Tabular.html

which is for Spreadsheets files. It is useful as an example for creating something similar for DOCX files.

On 8/8/15, H. Hirzel <[hidden email]> wrote:

> A similar library but for Java
>
> http://www.docx4java.org/trac/docx4j
>
> On 8/7/15, H. Hirzel <[hidden email]> wrote:
>> Hello
>>
>> Is there a library like for Pharo to generate DOCX files?
>>
>> Something like this
>> https://docx.codeplex.com/
>> DocX is a .NET library that allows developers to manipulate Word
>> 2007/2010/2013 files, in an easy and intuitive manor. DocX is fast,
>> lightweight and best of all it does not require Microsoft Word or
>> Office to be installed.
>>
>> Regards
>>
>> Hannes
>>
>



Reply | Threaded
Open this post in threaded view
|

Re: MSOffice DOCX generation?

Hannes Hirzel
Yes, this is what I realized when looking at your code in Tabular.

This is a good basis to build upon. I started adding some versions to
http://ss3.gemtalksystems.com/ss/Tabular.html

mainly adding comments and grouping method into protocols.

Your test cases are useful.

May I ask you to add some comment to the exporters subpackage?

Hannes


On 8/8/15, Vincent BLONDEAU <[hidden email]> wrote:

> I think you can improve Tabular to generate DOCX files. It is the same file
> standard than XLSX.
>
> Vincent
>
> -----Message d'origine-----
> De : Pharo-users [mailto:[hidden email]] De la part de
> H. Hirzel
> Envoyé : samedi 8 août 2015 08:56
> À : Any question about pharo is welcome
> Objet : Re: [Pharo-users] MSOffice DOCX generation?
>
> I found Tabular
>
> http://ss3.gemtalksystems.com/ss/Tabular.html
>
> which is for Spreadsheets files. It is useful as an example for creating
> something similar for DOCX files.
>
> On 8/8/15, H. Hirzel <[hidden email]> wrote:
>> A similar library but for Java
>>
>> http://www.docx4java.org/trac/docx4j
>>
>> On 8/7/15, H. Hirzel <[hidden email]> wrote:
>>> Hello
>>>
>>> Is there a library like for Pharo to generate DOCX files?
>>>
>>> Something like this
>>> https://docx.codeplex.com/
>>> DocX is a .NET library that allows developers to manipulate Word
>>> 2007/2010/2013 files, in an easy and intuitive manor. DocX is fast,
>>> lightweight and best of all it does not require Microsoft Word or
>>> Office to be installed.
>>>
>>> Regards
>>>
>>> Hannes
>>>
>>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: MSOffice DOCX generation?

Hannes Hirzel
Mainly the answer to the question: How do I use the experimental exporter class?




On 8/8/15, H. Hirzel <[hidden email]> wrote:

> Yes, this is what I realized when looking at your code in Tabular.
>
> This is a good basis to build upon. I started adding some versions to
> http://ss3.gemtalksystems.com/ss/Tabular.html
>
> mainly adding comments and grouping method into protocols.
>
> Your test cases are useful.
>
> May I ask you to add some comment to the exporters subpackage?
>
> Hannes
>
>
> On 8/8/15, Vincent BLONDEAU <[hidden email]> wrote:
>> I think you can improve Tabular to generate DOCX files. It is the same
>> file
>> standard than XLSX.
>>
>> Vincent
>>
>> -----Message d'origine-----
>> De : Pharo-users [mailto:[hidden email]] De la part
>> de
>> H. Hirzel
>> Envoyé : samedi 8 août 2015 08:56
>> À : Any question about pharo is welcome
>> Objet : Re: [Pharo-users] MSOffice DOCX generation?
>>
>> I found Tabular
>>
>> http://ss3.gemtalksystems.com/ss/Tabular.html
>>
>> which is for Spreadsheets files. It is useful as an example for creating
>> something similar for DOCX files.
>>
>> On 8/8/15, H. Hirzel <[hidden email]> wrote:
>>> A similar library but for Java
>>>
>>> http://www.docx4java.org/trac/docx4j
>>>
>>> On 8/7/15, H. Hirzel <[hidden email]> wrote:
>>>> Hello
>>>>
>>>> Is there a library like for Pharo to generate DOCX files?
>>>>
>>>> Something like this
>>>> https://docx.codeplex.com/
>>>> DocX is a .NET library that allows developers to manipulate Word
>>>> 2007/2010/2013 files, in an easy and intuitive manor. DocX is fast,
>>>> lightweight and best of all it does not require Microsoft Word or
>>>> Office to be installed.
>>>>
>>>> Regards
>>>>
>>>> Hannes
>>>>
>>>
>>
>>
>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: MSOffice DOCX generation?

Yuriy Mironenko
Give me couple of minutes to make answer, please.

2015-08-08 13:14 GMT+03:00 H. Hirzel <[hidden email]>:
Mainly the answer to the question: How do I use the experimental exporter class?




On 8/8/15, H. Hirzel <[hidden email]> wrote:
> Yes, this is what I realized when looking at your code in Tabular.
>
> This is a good basis to build upon. I started adding some versions to
> http://ss3.gemtalksystems.com/ss/Tabular.html
>
> mainly adding comments and grouping method into protocols.
>
> Your test cases are useful.
>
> May I ask you to add some comment to the exporters subpackage?
>
> Hannes
>
>
> On 8/8/15, Vincent BLONDEAU <[hidden email]> wrote:
>> I think you can improve Tabular to generate DOCX files. It is the same
>> file
>> standard than XLSX.
>>
>> Vincent
>>
>> -----Message d'origine-----
>> De : Pharo-users [mailto:[hidden email]] De la part
>> de
>> H. Hirzel
>> Envoyé : samedi 8 août 2015 08:56
>> À : Any question about pharo is welcome
>> Objet : Re: [Pharo-users] MSOffice DOCX generation?
>>
>> I found Tabular
>>
>> http://ss3.gemtalksystems.com/ss/Tabular.html
>>
>> which is for Spreadsheets files. It is useful as an example for creating
>> something similar for DOCX files.
>>
>> On 8/8/15, H. Hirzel <[hidden email]> wrote:
>>> A similar library but for Java
>>>
>>> http://www.docx4java.org/trac/docx4j
>>>
>>> On 8/7/15, H. Hirzel <[hidden email]> wrote:
>>>> Hello
>>>>
>>>> Is there a library like for Pharo to generate DOCX files?
>>>>
>>>> Something like this
>>>> https://docx.codeplex.com/
>>>> DocX is a .NET library that allows developers to manipulate Word
>>>> 2007/2010/2013 files, in an easy and intuitive manor. DocX is fast,
>>>> lightweight and best of all it does not require Microsoft Word or
>>>> Office to be installed.
>>>>
>>>> Regards
>>>>
>>>> Hannes
>>>>
>>>
>>
>>
>>
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: MSOffice DOCX generation?

Hannes Hirzel
Sorry I do not want to put you under pressure, the second email was
just meant as a clarificiation of the first :-), take you time.

--HH

On 8/8/15, Юрий Мироненко <[hidden email]> wrote:

> Give me couple of minutes to make answer, please.
>
> 2015-08-08 13:14 GMT+03:00 H. Hirzel <[hidden email]>:
>
>> Mainly the answer to the question: How do I use the experimental exporter
>> class?
>>
>>
>>
>>
>> On 8/8/15, H. Hirzel <[hidden email]> wrote:
>> > Yes, this is what I realized when looking at your code in Tabular.
>> >
>> > This is a good basis to build upon. I started adding some versions to
>> > http://ss3.gemtalksystems.com/ss/Tabular.html
>> >
>> > mainly adding comments and grouping method into protocols.
>> >
>> > Your test cases are useful.
>> >
>> > May I ask you to add some comment to the exporters subpackage?
>> >
>> > Hannes
>> >
>> >
>> > On 8/8/15, Vincent BLONDEAU <[hidden email]>
>> > wrote:
>> >> I think you can improve Tabular to generate DOCX files. It is the same
>> >> file
>> >> standard than XLSX.
>> >>
>> >> Vincent
>> >>
>> >> -----Message d'origine-----
>> >> De : Pharo-users [mailto:[hidden email]] De la
>> part
>> >> de
>> >> H. Hirzel
>> >> Envoyé : samedi 8 août 2015 08:56
>> >> À : Any question about pharo is welcome
>> >> Objet : Re: [Pharo-users] MSOffice DOCX generation?
>> >>
>> >> I found Tabular
>> >>
>> >> http://ss3.gemtalksystems.com/ss/Tabular.html
>> >>
>> >> which is for Spreadsheets files. It is useful as an example for
>> >> creating
>> >> something similar for DOCX files.
>> >>
>> >> On 8/8/15, H. Hirzel <[hidden email]> wrote:
>> >>> A similar library but for Java
>> >>>
>> >>> http://www.docx4java.org/trac/docx4j
>> >>>
>> >>> On 8/7/15, H. Hirzel <[hidden email]> wrote:
>> >>>> Hello
>> >>>>
>> >>>> Is there a library like for Pharo to generate DOCX files?
>> >>>>
>> >>>> Something like this
>> >>>> https://docx.codeplex.com/
>> >>>> DocX is a .NET library that allows developers to manipulate Word
>> >>>> 2007/2010/2013 files, in an easy and intuitive manor. DocX is fast,
>> >>>> lightweight and best of all it does not require Microsoft Word or
>> >>>> Office to be installed.
>> >>>>
>> >>>> Regards
>> >>>>
>> >>>> Hannes
>> >>>>
>> >>>
>> >>
>> >>
>> >>
>> >>
>> >
>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: MSOffice DOCX generation?

Yuriy Mironenko
Sorry if I was crude - it was not my intention :)
I just spotted your question and have started investigation, and I just wanted to show that I'm in process of answering and answer will soon be here. Unfortunately, unexpected emergency happened...well, anyway:

Using of TabularExperimenting is very simple (though not very usable):

tab := TabularExperimenting new.
tab generateXLSX.


It will generate file named "Test.xlsx" in the current directory (in windows environment it is directory same to image one in most cases, in ubuntu it's home folder of the current user).

If you'll see closely on TabularExperimenting, the model for the export is genrated in #initialize method. And, as far as I remember, it do not support multi-sheets documents (only first sheet will be actually written to the file). That's why it's Experimenting, not Exporter :)

Well, I have used this code in production, making very quick, dirty and obvious API for this TabularExperimenting class. It's on repo now, but not recommended for loading (see the version comments to find one if you want to see it).




2015-08-08 13:32 GMT+03:00 H. Hirzel <[hidden email]>:
Sorry I do not want to put you under pressure, the second email was
just meant as a clarificiation of the first :-), take you time.

--HH

On 8/8/15, Юрий Мироненко <[hidden email]> wrote:
> Give me couple of minutes to make answer, please.
>
> 2015-08-08 13:14 GMT+03:00 H. Hirzel <[hidden email]>:
>
>> Mainly the answer to the question: How do I use the experimental exporter
>> class?
>>
>>
>>
>>
>> On 8/8/15, H. Hirzel <[hidden email]> wrote:
>> > Yes, this is what I realized when looking at your code in Tabular.
>> >
>> > This is a good basis to build upon. I started adding some versions to
>> > http://ss3.gemtalksystems.com/ss/Tabular.html
>> >
>> > mainly adding comments and grouping method into protocols.
>> >
>> > Your test cases are useful.
>> >
>> > May I ask you to add some comment to the exporters subpackage?
>> >
>> > Hannes
>> >
>> >
>> > On 8/8/15, Vincent BLONDEAU <[hidden email]>
>> > wrote:
>> >> I think you can improve Tabular to generate DOCX files. It is the same
>> >> file
>> >> standard than XLSX.
>> >>
>> >> Vincent
>> >>
>> >> -----Message d'origine-----
>> >> De : Pharo-users [mailto:[hidden email]] De la
>> part
>> >> de
>> >> H. Hirzel
>> >> Envoyé : samedi 8 août 2015 08:56
>> >> À : Any question about pharo is welcome
>> >> Objet : Re: [Pharo-users] MSOffice DOCX generation?
>> >>
>> >> I found Tabular
>> >>
>> >> http://ss3.gemtalksystems.com/ss/Tabular.html
>> >>
>> >> which is for Spreadsheets files. It is useful as an example for
>> >> creating
>> >> something similar for DOCX files.
>> >>
>> >> On 8/8/15, H. Hirzel <[hidden email]> wrote:
>> >>> A similar library but for Java
>> >>>
>> >>> http://www.docx4java.org/trac/docx4j
>> >>>
>> >>> On 8/7/15, H. Hirzel <[hidden email]> wrote:
>> >>>> Hello
>> >>>>
>> >>>> Is there a library like for Pharo to generate DOCX files?
>> >>>>
>> >>>> Something like this
>> >>>> https://docx.codeplex.com/
>> >>>> DocX is a .NET library that allows developers to manipulate Word
>> >>>> 2007/2010/2013 files, in an easy and intuitive manor. DocX is fast,
>> >>>> lightweight and best of all it does not require Microsoft Word or
>> >>>> Office to be installed.
>> >>>>
>> >>>> Regards
>> >>>>
>> >>>> Hannes
>> >>>>
>> >>>
>> >>
>> >>
>> >>
>> >>
>> >
>>
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: MSOffice DOCX generation?

Yuriy Mironenko
And talking about DOCX generation: it looks like the hardest part is to implement model. DOCX generation is boring but straightforward.

Can you try to implement/describe such a model?

2015-08-08 22:25 GMT+03:00 Юрий Мироненко <[hidden email]>:
Sorry if I was crude - it was not my intention :)
I just spotted your question and have started investigation, and I just wanted to show that I'm in process of answering and answer will soon be here. Unfortunately, unexpected emergency happened...well, anyway:

Using of TabularExperimenting is very simple (though not very usable):

tab := TabularExperimenting new.
tab generateXLSX.


It will generate file named "Test.xlsx" in the current directory (in windows environment it is directory same to image one in most cases, in ubuntu it's home folder of the current user).

If you'll see closely on TabularExperimenting, the model for the export is genrated in #initialize method. And, as far as I remember, it do not support multi-sheets documents (only first sheet will be actually written to the file). That's why it's Experimenting, not Exporter :)

Well, I have used this code in production, making very quick, dirty and obvious API for this TabularExperimenting class. It's on repo now, but not recommended for loading (see the version comments to find one if you want to see it).




2015-08-08 13:32 GMT+03:00 H. Hirzel <[hidden email]>:
Sorry I do not want to put you under pressure, the second email was
just meant as a clarificiation of the first :-), take you time.

--HH

On 8/8/15, Юрий Мироненко <[hidden email]> wrote:
> Give me couple of minutes to make answer, please.
>
> 2015-08-08 13:14 GMT+03:00 H. Hirzel <[hidden email]>:
>
>> Mainly the answer to the question: How do I use the experimental exporter
>> class?
>>
>>
>>
>>
>> On 8/8/15, H. Hirzel <[hidden email]> wrote:
>> > Yes, this is what I realized when looking at your code in Tabular.
>> >
>> > This is a good basis to build upon. I started adding some versions to
>> > http://ss3.gemtalksystems.com/ss/Tabular.html
>> >
>> > mainly adding comments and grouping method into protocols.
>> >
>> > Your test cases are useful.
>> >
>> > May I ask you to add some comment to the exporters subpackage?
>> >
>> > Hannes
>> >
>> >
>> > On 8/8/15, Vincent BLONDEAU <[hidden email]>
>> > wrote:
>> >> I think you can improve Tabular to generate DOCX files. It is the same
>> >> file
>> >> standard than XLSX.
>> >>
>> >> Vincent
>> >>
>> >> -----Message d'origine-----
>> >> De : Pharo-users [mailto:[hidden email]] De la
>> part
>> >> de
>> >> H. Hirzel
>> >> Envoyé : samedi 8 août 2015 08:56
>> >> À : Any question about pharo is welcome
>> >> Objet : Re: [Pharo-users] MSOffice DOCX generation?
>> >>
>> >> I found Tabular
>> >>
>> >> http://ss3.gemtalksystems.com/ss/Tabular.html
>> >>
>> >> which is for Spreadsheets files. It is useful as an example for
>> >> creating
>> >> something similar for DOCX files.
>> >>
>> >> On 8/8/15, H. Hirzel <[hidden email]> wrote:
>> >>> A similar library but for Java
>> >>>
>> >>> http://www.docx4java.org/trac/docx4j
>> >>>
>> >>> On 8/7/15, H. Hirzel <[hidden email]> wrote:
>> >>>> Hello
>> >>>>
>> >>>> Is there a library like for Pharo to generate DOCX files?
>> >>>>
>> >>>> Something like this
>> >>>> https://docx.codeplex.com/
>> >>>> DocX is a .NET library that allows developers to manipulate Word
>> >>>> 2007/2010/2013 files, in an easy and intuitive manor. DocX is fast,
>> >>>> lightweight and best of all it does not require Microsoft Word or
>> >>>> Office to be installed.
>> >>>>
>> >>>> Regards
>> >>>>
>> >>>> Hannes
>> >>>>
>> >>>
>> >>
>> >>
>> >>
>> >>
>> >
>>
>>
>



Reply | Threaded
Open this post in threaded view
|

Re: MSOffice DOCX generation?

Hannes Hirzel
I consider an evolution of models with increasing complexity

The goal is to have at least  something as here but in certain areas more
http://davidgohel.github.io/ReporteRs/word.html


So it is

Model 1 Subset
-----------------------

Headings
Paragraphs
Tables   (here comes  your TABULAR model into action)
Images
pagebreak


Model 2 Subset
-----------------------
= Model 1 plus

TOC
sections
Columns
hrefs


Model 3 Subset
-----------------------
???
not yet defined


Formatting
----------------

Maybe direct formatting in the code

but later surely all done with styles (no direct formatting)

The styles have
bold / italic / regular
font and font size
color
subscript / superscript

On 8/9/15, Юрий Мироненко <[hidden email]> wrote:

> And talking about DOCX generation: it looks like the hardest part is to
> implement *model*. DOCX generation is boring but straightforward.
>
> Can you try to implement/describe such a model?
>
> 2015-08-08 22:25 GMT+03:00 Юрий Мироненко <[hidden email]>:
>
>> Sorry if I was crude - it was not my intention :)
>> I just spotted your question and have started investigation, and I just
>> wanted to show that I'm in process of answering and answer will soon be
>> here. Unfortunately, unexpected emergency happened...well, anyway:
>>
>> Using of TabularExperimenting is very simple (though not very usable):
>>
>> tab := TabularExperimenting new.
>> tab generateXLSX.
>>
>> It will generate file named "Test.xlsx" in the current directory (in
>> windows environment it is directory same to image one in most cases, in
>> ubuntu it's home folder of the current user).
>>
>> If you'll see closely on TabularExperimenting, the model for the export
>> is
>> genrated in #initialize method. And, as far as I remember, it do not
>> support multi-sheets documents (only first sheet will be actually written
>> to the file). That's why it's Experimenting, not Exporter :)
>>
>> Well, I have used this code in production, making very quick, dirty and
>> obvious API for this TabularExperimenting class. It's on repo now, but
>> not
>> recommended for loading (see the version comments to find one if you want
>> to see it).
>>
>>
>>
>>
>> 2015-08-08 13:32 GMT+03:00 H. Hirzel <[hidden email]>:
>>
>>> Sorry I do not want to put you under pressure, the second email was
>>> just meant as a clarificiation of the first :-), take you time.
>>>
>>> --HH
>>>
>>> On 8/8/15, Юрий Мироненко <[hidden email]> wrote:
>>> > Give me couple of minutes to make answer, please.
>>> >
>>> > 2015-08-08 13:14 GMT+03:00 H. Hirzel <[hidden email]>:
>>> >
>>> >> Mainly the answer to the question: How do I use the experimental
>>> exporter
>>> >> class?
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> On 8/8/15, H. Hirzel <[hidden email]> wrote:
>>> >> > Yes, this is what I realized when looking at your code in Tabular.
>>> >> >
>>> >> > This is a good basis to build upon. I started adding some versions
>>> >> > to
>>> >> > http://ss3.gemtalksystems.com/ss/Tabular.html
>>> >> >
>>> >> > mainly adding comments and grouping method into protocols.
>>> >> >
>>> >> > Your test cases are useful.
>>> >> >
>>> >> > May I ask you to add some comment to the exporters subpackage?
>>> >> >
>>> >> > Hannes
>>> >> >
>>> >> >
>>> >> > On 8/8/15, Vincent BLONDEAU <[hidden email]>
>>> >> > wrote:
>>> >> >> I think you can improve Tabular to generate DOCX files. It is the
>>> same
>>> >> >> file
>>> >> >> standard than XLSX.
>>> >> >>
>>> >> >> Vincent
>>> >> >>
>>> >> >> -----Message d'origine-----
>>> >> >> De : Pharo-users [mailto:[hidden email]] De
>>> >> >> la
>>> >> part
>>> >> >> de
>>> >> >> H. Hirzel
>>> >> >> Envoyé : samedi 8 août 2015 08:56
>>> >> >> À : Any question about pharo is welcome
>>> >> >> Objet : Re: [Pharo-users] MSOffice DOCX generation?
>>> >> >>
>>> >> >> I found Tabular
>>> >> >>
>>> >> >> http://ss3.gemtalksystems.com/ss/Tabular.html
>>> >> >>
>>> >> >> which is for Spreadsheets files. It is useful as an example for
>>> >> >> creating
>>> >> >> something similar for DOCX files.
>>> >> >>
>>> >> >> On 8/8/15, H. Hirzel <[hidden email]> wrote:
>>> >> >>> A similar library but for Java
>>> >> >>>
>>> >> >>> http://www.docx4java.org/trac/docx4j
>>> >> >>>
>>> >> >>> On 8/7/15, H. Hirzel <[hidden email]> wrote:
>>> >> >>>> Hello
>>> >> >>>>
>>> >> >>>> Is there a library like for Pharo to generate DOCX files?
>>> >> >>>>
>>> >> >>>> Something like this
>>> >> >>>> https://docx.codeplex.com/
>>> >> >>>> DocX is a .NET library that allows developers to manipulate Word
>>> >> >>>> 2007/2010/2013 files, in an easy and intuitive manor. DocX is
>>> fast,
>>> >> >>>> lightweight and best of all it does not require Microsoft Word
>>> >> >>>> or
>>> >> >>>> Office to be installed.
>>> >> >>>>
>>> >> >>>> Regards
>>> >> >>>>
>>> >> >>>> Hannes
>>> >> >>>>
>>> >> >>>
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >
>>> >>
>>> >>
>>> >
>>>
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: MSOffice DOCX generation?

Hannes Hirzel
And as Model 0

Model 0 Subset
-----------------------
Headings
Tables   (here comes  your TABULAR model into action)

This means it can be a TabularDOCXExport class in
http://ss3.gemtalksystems.com/ss/Tabular.html for a start.

On 8/9/15, H. Hirzel <[hidden email]> wrote:

> I consider an evolution of models with increasing complexity
>
> The goal is to have at least  something as here but in certain areas more
> http://davidgohel.github.io/ReporteRs/word.html
>
>
> So it is
>
> Model 1 Subset
> -----------------------
>
> Headings
> Paragraphs
> Tables   (here comes  your TABULAR model into action)
> Images
> pagebreak
>
>
> Model 2 Subset
> -----------------------
> = Model 1 plus
>
> TOC
> sections
> Columns
> hrefs
>
>
> Model 3 Subset
> -----------------------
> ???
> not yet defined
>
>
> Formatting
> ----------------
>
> Maybe direct formatting in the code
>
> but later surely all done with styles (no direct formatting)
>
> The styles have
> bold / italic / regular
> font and font size
> color
> subscript / superscript
>
> On 8/9/15, Юрий Мироненко <[hidden email]> wrote:
>> And talking about DOCX generation: it looks like the hardest part is to
>> implement *model*. DOCX generation is boring but straightforward.
>>
>> Can you try to implement/describe such a model?
>>
>> 2015-08-08 22:25 GMT+03:00 Юрий Мироненко <[hidden email]>:
>>
>>> Sorry if I was crude - it was not my intention :)
>>> I just spotted your question and have started investigation, and I just
>>> wanted to show that I'm in process of answering and answer will soon be
>>> here. Unfortunately, unexpected emergency happened...well, anyway:
>>>
>>> Using of TabularExperimenting is very simple (though not very usable):
>>>
>>> tab := TabularExperimenting new.
>>> tab generateXLSX.
>>>
>>> It will generate file named "Test.xlsx" in the current directory (in
>>> windows environment it is directory same to image one in most cases, in
>>> ubuntu it's home folder of the current user).
>>>
>>> If you'll see closely on TabularExperimenting, the model for the export
>>> is
>>> genrated in #initialize method. And, as far as I remember, it do not
>>> support multi-sheets documents (only first sheet will be actually
>>> written
>>> to the file). That's why it's Experimenting, not Exporter :)
>>>
>>> Well, I have used this code in production, making very quick, dirty and
>>> obvious API for this TabularExperimenting class. It's on repo now, but
>>> not
>>> recommended for loading (see the version comments to find one if you
>>> want
>>> to see it).
>>>
>>>
>>>
>>>
>>> 2015-08-08 13:32 GMT+03:00 H. Hirzel <[hidden email]>:
>>>
>>>> Sorry I do not want to put you under pressure, the second email was
>>>> just meant as a clarificiation of the first :-), take you time.
>>>>
>>>> --HH
>>>>
>>>> On 8/8/15, Юрий Мироненко <[hidden email]> wrote:
>>>> > Give me couple of minutes to make answer, please.
>>>> >
>>>> > 2015-08-08 13:14 GMT+03:00 H. Hirzel <[hidden email]>:
>>>> >
>>>> >> Mainly the answer to the question: How do I use the experimental
>>>> exporter
>>>> >> class?
>>>> >>
>>>> >>
>>>> >>
>>>> >>
>>>> >> On 8/8/15, H. Hirzel <[hidden email]> wrote:
>>>> >> > Yes, this is what I realized when looking at your code in Tabular.
>>>> >> >
>>>> >> > This is a good basis to build upon. I started adding some versions
>>>> >> > to
>>>> >> > http://ss3.gemtalksystems.com/ss/Tabular.html
>>>> >> >
>>>> >> > mainly adding comments and grouping method into protocols.
>>>> >> >
>>>> >> > Your test cases are useful.
>>>> >> >
>>>> >> > May I ask you to add some comment to the exporters subpackage?
>>>> >> >
>>>> >> > Hannes
>>>> >> >
>>>> >> >
>>>> >> > On 8/8/15, Vincent BLONDEAU <[hidden email]>
>>>> >> > wrote:
>>>> >> >> I think you can improve Tabular to generate DOCX files. It is the
>>>> same
>>>> >> >> file
>>>> >> >> standard than XLSX.
>>>> >> >>
>>>> >> >> Vincent
>>>> >> >>
>>>> >> >> -----Message d'origine-----
>>>> >> >> De : Pharo-users [mailto:[hidden email]] De
>>>> >> >> la
>>>> >> part
>>>> >> >> de
>>>> >> >> H. Hirzel
>>>> >> >> Envoyé : samedi 8 août 2015 08:56
>>>> >> >> À : Any question about pharo is welcome
>>>> >> >> Objet : Re: [Pharo-users] MSOffice DOCX generation?
>>>> >> >>
>>>> >> >> I found Tabular
>>>> >> >>
>>>> >> >> http://ss3.gemtalksystems.com/ss/Tabular.html
>>>> >> >>
>>>> >> >> which is for Spreadsheets files. It is useful as an example for
>>>> >> >> creating
>>>> >> >> something similar for DOCX files.
>>>> >> >>
>>>> >> >> On 8/8/15, H. Hirzel <[hidden email]> wrote:
>>>> >> >>> A similar library but for Java
>>>> >> >>>
>>>> >> >>> http://www.docx4java.org/trac/docx4j
>>>> >> >>>
>>>> >> >>> On 8/7/15, H. Hirzel <[hidden email]> wrote:
>>>> >> >>>> Hello
>>>> >> >>>>
>>>> >> >>>> Is there a library like for Pharo to generate DOCX files?
>>>> >> >>>>
>>>> >> >>>> Something like this
>>>> >> >>>> https://docx.codeplex.com/
>>>> >> >>>> DocX is a .NET library that allows developers to manipulate
>>>> >> >>>> Word
>>>> >> >>>> 2007/2010/2013 files, in an easy and intuitive manor. DocX is
>>>> fast,
>>>> >> >>>> lightweight and best of all it does not require Microsoft Word
>>>> >> >>>> or
>>>> >> >>>> Office to be installed.
>>>> >> >>>>
>>>> >> >>>> Regards
>>>> >> >>>>
>>>> >> >>>> Hannes
>>>> >> >>>>
>>>> >> >>>
>>>> >> >>
>>>> >> >>
>>>> >> >>
>>>> >> >>
>>>> >> >
>>>> >>
>>>> >>
>>>> >
>>>>
>>>>
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: MSOffice DOCX generation?

Hannes Hirzel
An initial version of a DOCX export (Headings and tables) here


http://ss3.gemtalksystems.com/ss/Tabular.html

(click on 'latest' and load configuration and Tabular*.mcz file).

--Hannes

On 8/9/15, H. Hirzel <[hidden email]> wrote:

> And as Model 0
>
> Model 0 Subset
> -----------------------
> Headings
> Tables   (here comes  your TABULAR model into action)
>
> This means it can be a TabularDOCXExport class in
> http://ss3.gemtalksystems.com/ss/Tabular.html for a start.
>
> On 8/9/15, H. Hirzel <[hidden email]> wrote:
>> I consider an evolution of models with increasing complexity
>>
>> The goal is to have at least  something as here but in certain areas more
>> http://davidgohel.github.io/ReporteRs/word.html
>>
>>
>> So it is
>>
>> Model 1 Subset
>> -----------------------
>>
>> Headings
>> Paragraphs
>> Tables   (here comes  your TABULAR model into action)
>> Images
>> pagebreak
>>
>>
>> Model 2 Subset
>> -----------------------
>> = Model 1 plus
>>
>> TOC
>> sections
>> Columns
>> hrefs
>>
>>
>> Model 3 Subset
>> -----------------------
>> ???
>> not yet defined
>>
>>
>> Formatting
>> ----------------
>>
>> Maybe direct formatting in the code
>>
>> but later surely all done with styles (no direct formatting)
>>
>> The styles have
>> bold / italic / regular
>> font and font size
>> color
>> subscript / superscript
>>
>> On 8/9/15, Юрий Мироненко <[hidden email]> wrote:
>>> And talking about DOCX generation: it looks like the hardest part is to
>>> implement *model*. DOCX generation is boring but straightforward.
>>>
>>> Can you try to implement/describe such a model?
>>>
>>> 2015-08-08 22:25 GMT+03:00 Юрий Мироненко <[hidden email]>:
>>>
>>>> Sorry if I was crude - it was not my intention :)
>>>> I just spotted your question and have started investigation, and I just
>>>> wanted to show that I'm in process of answering and answer will soon be
>>>> here. Unfortunately, unexpected emergency happened...well, anyway:
>>>>
>>>> Using of TabularExperimenting is very simple (though not very usable):
>>>>
>>>> tab := TabularExperimenting new.
>>>> tab generateXLSX.
>>>>
>>>> It will generate file named "Test.xlsx" in the current directory (in
>>>> windows environment it is directory same to image one in most cases, in
>>>> ubuntu it's home folder of the current user).
>>>>
>>>> If you'll see closely on TabularExperimenting, the model for the export
>>>> is
>>>> genrated in #initialize method. And, as far as I remember, it do not
>>>> support multi-sheets documents (only first sheet will be actually
>>>> written
>>>> to the file). That's why it's Experimenting, not Exporter :)
>>>>
>>>> Well, I have used this code in production, making very quick, dirty and
>>>> obvious API for this TabularExperimenting class. It's on repo now, but
>>>> not
>>>> recommended for loading (see the version comments to find one if you
>>>> want
>>>> to see it).
>>>>
>>>>
>>>>
>>>>
>>>> 2015-08-08 13:32 GMT+03:00 H. Hirzel <[hidden email]>:
>>>>
>>>>> Sorry I do not want to put you under pressure, the second email was
>>>>> just meant as a clarificiation of the first :-), take you time.
>>>>>
>>>>> --HH
>>>>>
>>>>> On 8/8/15, Юрий Мироненко <[hidden email]> wrote:
>>>>> > Give me couple of minutes to make answer, please.
>>>>> >
>>>>> > 2015-08-08 13:14 GMT+03:00 H. Hirzel <[hidden email]>:
>>>>> >
>>>>> >> Mainly the answer to the question: How do I use the experimental
>>>>> exporter
>>>>> >> class?
>>>>> >>
>>>>> >>
>>>>> >>
>>>>> >>
>>>>> >> On 8/8/15, H. Hirzel <[hidden email]> wrote:
>>>>> >> > Yes, this is what I realized when looking at your code in
>>>>> >> > Tabular.
>>>>> >> >
>>>>> >> > This is a good basis to build upon. I started adding some
>>>>> >> > versions
>>>>> >> > to
>>>>> >> > http://ss3.gemtalksystems.com/ss/Tabular.html
>>>>> >> >
>>>>> >> > mainly adding comments and grouping method into protocols.
>>>>> >> >
>>>>> >> > Your test cases are useful.
>>>>> >> >
>>>>> >> > May I ask you to add some comment to the exporters subpackage?
>>>>> >> >
>>>>> >> > Hannes
>>>>> >> >
>>>>> >> >
>>>>> >> > On 8/8/15, Vincent BLONDEAU <[hidden email]>
>>>>> >> > wrote:
>>>>> >> >> I think you can improve Tabular to generate DOCX files. It is
>>>>> >> >> the
>>>>> same
>>>>> >> >> file
>>>>> >> >> standard than XLSX.
>>>>> >> >>
>>>>> >> >> Vincent
>>>>> >> >>
>>>>> >> >> -----Message d'origine-----
>>>>> >> >> De : Pharo-users [mailto:[hidden email]] De
>>>>> >> >> la
>>>>> >> part
>>>>> >> >> de
>>>>> >> >> H. Hirzel
>>>>> >> >> Envoyé : samedi 8 août 2015 08:56
>>>>> >> >> À : Any question about pharo is welcome
>>>>> >> >> Objet : Re: [Pharo-users] MSOffice DOCX generation?
>>>>> >> >>
>>>>> >> >> I found Tabular
>>>>> >> >>
>>>>> >> >> http://ss3.gemtalksystems.com/ss/Tabular.html
>>>>> >> >>
>>>>> >> >> which is for Spreadsheets files. It is useful as an example for
>>>>> >> >> creating
>>>>> >> >> something similar for DOCX files.
>>>>> >> >>
>>>>> >> >> On 8/8/15, H. Hirzel <[hidden email]> wrote:
>>>>> >> >>> A similar library but for Java
>>>>> >> >>>
>>>>> >> >>> http://www.docx4java.org/trac/docx4j
>>>>> >> >>>
>>>>> >> >>> On 8/7/15, H. Hirzel <[hidden email]> wrote:
>>>>> >> >>>> Hello
>>>>> >> >>>>
>>>>> >> >>>> Is there a library like for Pharo to generate DOCX files?
>>>>> >> >>>>
>>>>> >> >>>> Something like this
>>>>> >> >>>> https://docx.codeplex.com/
>>>>> >> >>>> DocX is a .NET library that allows developers to manipulate
>>>>> >> >>>> Word
>>>>> >> >>>> 2007/2010/2013 files, in an easy and intuitive manor. DocX is
>>>>> fast,
>>>>> >> >>>> lightweight and best of all it does not require Microsoft Word
>>>>> >> >>>> or
>>>>> >> >>>> Office to be installed.
>>>>> >> >>>>
>>>>> >> >>>> Regards
>>>>> >> >>>>
>>>>> >> >>>> Hannes
>>>>> >> >>>>
>>>>> >> >>>
>>>>> >> >>
>>>>> >> >>
>>>>> >> >>
>>>>> >> >>
>>>>> >> >
>>>>> >>
>>>>> >>
>>>>> >
>>>>>
>>>>>
>>>>
>>>
>>
>