Applying Flare table stylesheets to tables imported fr Word

This forum is for all Flare issues related to importing files or projects.

Applying Flare table stylesheets to tables imported fr Word

Postby ChoccieMuffin on Wed May 01, 2019 7:23 am

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 2019r1.
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: 2069
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Applying Flare table stylesheets to tables imported fr W

Postby Dave Lee on Wed May 01, 2019 7:56 am

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.
Dave Lee
Master Propellus Maximus
 
Posts: 5609
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: Applying Flare table stylesheets to tables imported fr W

Postby ChoccieMuffin on Wed May 01, 2019 8:48 am

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 2019r1.
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: 2069
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Applying Flare table stylesheets to tables imported fr W

Postby wclass on Wed May 01, 2019 7:37 pm

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
wclass
Propellus Maximus
 
Posts: 1216
Joined: Mon Feb 27, 2006 5:56 am
Location: Melbourne, Australia

Re: Applying Flare table stylesheets to tables imported fr W

Postby kmorrison on Tue May 14, 2019 3:32 pm

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.
kmorrison
Propeller Head
 
Posts: 85
Joined: Mon Nov 11, 2013 3:04 pm
Location: Ottawa, Canada

Re: Applying Flare table stylesheets to tables imported fr W

Postby ChoccieMuffin on Thu May 16, 2019 6:14 am

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 2019r1.
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: 2069
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Applying Flare table stylesheets to tables imported fr W

Postby Dave Lee on Thu May 16, 2019 7:43 am

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?
Dave Lee
Master Propellus Maximus
 
Posts: 5609
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: Applying Flare table stylesheets to tables imported fr W

Postby ChoccieMuffin on Thu May 16, 2019 9:34 am

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 2019r1.
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: 2069
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Applying Flare table stylesheets to tables imported fr W

Postby ChoccieMuffin on Thu May 16, 2019 10:15 am

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 2019r1.
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: 2069
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK


Return to Importing

Who is online

Users browsing this forum: No registered users and 2 guests