Edit word or rtf file... need tables!

This is a discussion on Edit word or rtf file... need tables! within the PHP General forums, part of the PHP Programming Forums category; Hello, I want a dynamically growing table based off a template we have, i'm trying to replace a section ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-12-2006
gooderthanyou@gmail.com
 
Posts: n/a
Default Edit word or rtf file... need tables!

Hello,

I want a dynamically growing table based off a template we have, i'm
trying to replace a section of the document with a table using php.

If I use RTF, I have tried numerous code segments to create tables but
I always get a table that either stretches forever or looks really
weird with a big X in the last column.

Using .doc, word has cryptic code for everything, I can start searching
through for a table but it might be messy.

Is there any other formats I could explore and keep my template?

Reply With Quote
  #2 (permalink)  
Old 05-12-2006
gooderthanyou@gmail.com
 
Posts: n/a
Default Re: Edit word or rtf file... need tables!

{ rowd rgaph300 rleft400\cellx1500\cellx3000\cellx4500\pard\intbl Doo
wah ditty ditty dum ditty do \cell
\pard\intbl Doo wah ditty ditty dum ditty do \cell
\pard\intbl Doo wah ditty ditty dum ditty do \cell
ow rowd rgaph300 rleft400\cellx1500\cellx3000\cellx4500
\pard\intbl Doo wah ditty ditty dum ditty do \cell
\pard\intbl Doo wah ditty ditty dum ditty do \cell
\pard\intbl Doo wah ditty ditty dum ditty do \cell
ow rowd rgaph300 rleft400\cellx1500\cellx3500
\pard\intbl Doo wah ditty ditty dum ditty do \cell
\pard\intbl Doo wah ditty ditty dum ditty do \cell
ow
}

After php replaces the string and saves my rtf file... If I open it in
notepad I see that "/row" is being chopped up to "ow" as well as all
other \t and \r ... which are escape sequences...just added another /
to make sure it doesn't escape and voila.

Reply With Quote
  #3 (permalink)  
Old 05-12-2006
George Mills
 
Posts: n/a
Default Re: Edit word or rtf file... need tables!

gooderthanyou@gmail.com wrote:
> { rowd rgaph300 rleft400\cellx1500\cellx3000\cellx4500\pard\intbl Doo
> wah ditty ditty dum ditty do \cell
> \pard\intbl Doo wah ditty ditty dum ditty do \cell
> \pard\intbl Doo wah ditty ditty dum ditty do \cell
> ow rowd rgaph300 rleft400\cellx1500\cellx3000\cellx4500
> \pard\intbl Doo wah ditty ditty dum ditty do \cell
> \pard\intbl Doo wah ditty ditty dum ditty do \cell
> \pard\intbl Doo wah ditty ditty dum ditty do \cell
> ow rowd rgaph300 rleft400\cellx1500\cellx3500
> \pard\intbl Doo wah ditty ditty dum ditty do \cell
> \pard\intbl Doo wah ditty ditty dum ditty do \cell
> ow
> }
>
> After php replaces the string and saves my rtf file... If I open it in
> notepad I see that "/row" is being chopped up to "ow" as well as all
> other \t and \r ... which are escape sequences...just added another /
> to make sure it doesn't escape and voila.
>


After a quick internet search I found this:
http://www.terrawebdesign.com/multidimensional.php

I don't know if it is close enough to what you want to do to be of help.
It might be a little more complicated than what you are looking to do.
If you are unfamiliar with php arrays be sure to reference:
http://www.php.net/manual/en/language.types.array.php

If you have specific question about how to get from this example to your
solution someone here might be able to help.

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:55 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0