Applying Flare table stylesheets to tables imported fr Word

This forum is for all Flare issues related to importing files or projects.
Post Reply
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Applying Flare table stylesheets to tables imported fr Word

Post by ChoccieMuffin »

Afternoon all.

I fear I already know the answer, but with an optimistic viewpoint I'll ask again - someone, somewhere, might have worked out how to do this!

I have Word documents that contain assorted tables.
I want the tables to use Flare table stylesheets in the final output.
I import the Word files and do some search-and-replace operations on the HTML (tidying up kinda stuff) but don't open the projects in Flare and then play with them.

Is there any way, perhaps with fancy search-and-replace or any other whizzy way, that I can apply table styles to these imported tables without having to go into Flare and apply the styles manually?
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Applying Flare table stylesheets to tables imported fr W

Post by NorthEast »

You can use search and replace to update the table tag with the appropriate style and class attributes - e.g.

Code: Select all

<table style="mc-table-style: url('Resources/TableStyles/YourTable.css');" class="TableStyle-YourTable" >
Although that might be a pain, since the url is going to be relative to the topic folder.

I think Flare should generate the table ok from that - it'll fill in all the individual classes on the table cells.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Applying Flare table stylesheets to tables imported fr W

Post by ChoccieMuffin »

Dave Lee wrote:You can use search and replace to update the table tag with the appropriate style and class attributes - e.g.

Code: Select all

<table style="mc-table-style: url('Resources/TableStyles/YourTable.css');" class="TableStyle-YourTable" >
Although that might be a pain, since the url is going to be relative to the topic folder.

I think Flare should generate the table ok from that - it'll fill in all the individual classes on the table cells.
I'll give it a go and will report back. Keep your fingers crossed!
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
wclass
Propellus Maximus
Posts: 1238
Joined: Mon Feb 27, 2006 5:56 am
Location: Melbourne, Australia

Re: Applying Flare table stylesheets to tables imported fr W

Post by wclass »

ChoccieMuffin wrote:
Dave Lee wrote:...
Although that might be a pain, since the url is going to be relative to the topic folder.
We use ordinary tables, not Flare table styles, so I can't comment on the table cells.
However, wanted to add that we do all our Find/Replace actions (using FAR outside of Flare) when the topics are still in the generated import folder so any URLs can be set to work there. Our final step is to then to get in Flare and move the topics to their final location, and Flare will update any links for us.
One of the actions we do is a Find/Replace on <table> tags to include our own style classes.
Margaret Hassall - Melbourne
kmorrison
Sr. Propeller Head
Posts: 104
Joined: Mon Nov 11, 2013 3:04 pm
Location: Ottawa, Canada
Contact:

Re: Applying Flare table stylesheets to tables imported fr W

Post by kmorrison »

Open the table style you want to use, as though you were going to make changes to the style.
Right at the top of the table style tab, there's a little inconspicuous button that says "Apply Style..." Click it. The box that pops up is fairly self-explanatory, I think, in terms of what it does.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Applying Flare table stylesheets to tables imported fr W

Post by ChoccieMuffin »

kmorrison wrote:Open the table style you want to use, as though you were going to make changes to the style.
Right at the top of the table style tab, there's a little inconspicuous button that says "Apply Style..." Click it. The box that pops up is fairly self-explanatory, I think, in terms of what it does.
Thanks, kmorrison, but unfortunately your suggestion doesn't solve my problem. I specifically don't want to go into Flare to do anything manually - this needs to be something I can do by messing about in the basic text of the html files outside of Flare (so I can automate the process) as I have far too many PDFs that are produced automatically every night by running the build scripts.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Applying Flare table stylesheets to tables imported fr W

Post by NorthEast »

ChoccieMuffin wrote:
kmorrison wrote:Open the table style you want to use, as though you were going to make changes to the style.
Right at the top of the table style tab, there's a little inconspicuous button that says "Apply Style..." Click it. The box that pops up is fairly self-explanatory, I think, in terms of what it does.
Thanks, kmorrison, but unfortunately your suggestion doesn't solve my problem. I specifically don't want to go into Flare to do anything manually - this needs to be something I can do by messing about in the basic text of the html files outside of Flare (so I can automate the process) as I have far too many PDFs that are produced automatically every night by running the build scripts.
The code I posted above is doing the same thing, by setting that table style class (and CSS link) in the HTML. Did that not work?
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Applying Flare table stylesheets to tables imported fr W

Post by ChoccieMuffin »

Dave Lee wrote:The code I posted above is doing the same thing, by setting that table style class (and CSS link) in the HTML. Did that not work?
I got distracted ( by work - how very dare it!) and haven't tried your suggestion yet, but wanted to also acknowledge kmorrison's contribution to the discussion. And now I realise I haven't thanked you either! :oops: So thank you, Dave, I have now been reminded of your excellent suggestion, which I shall try now I've found a few spare minutes to play. :)
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Applying Flare table stylesheets to tables imported fr W

Post by ChoccieMuffin »

Dave Lee wrote:You can use search and replace to update the table tag with the appropriate style and class attributes - e.g.

Code: Select all

<table style="mc-table-style: url('Resources/TableStyles/YourTable.css');" class="TableStyle-YourTable" >
Although that might be a pain, since the url is going to be relative to the topic folder.

I think Flare should generate the table ok from that - it'll fill in all the individual classes on the table cells.
Thanks Dave, that worked a treat. In all of these imported topics, the table stylesheets are always in the same place relative to the imported topics so it completely does the trick. I was concerned that just changing the table heading wouldn't impose all the other row and cell styles, but it did, like magic!

I've been meaning to do something about this set of documents, and now <massive echo effect>I HAVE THE POWER!!!</massive echo effect> (in the style of He-Man or She-Ra)

I can go home happy now. :lol:
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Post Reply