• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

XenCarta meets Google API tables

Moses

Well-known member
#1
I've put together an Excel template which simplifies the process of inserting Google API tables into XenCarta. Still needs work, at this stage it's more a proof of concept and I'm hoping to get feedback to improve it and simplify the process for users.

You can download it from the demo page
http://www.greenandgoldrugby.com/community/wiki/google-table-test/

Thanks to Brogan for his help with Google API tables.
 

Brogan

XenForo moderator
Staff member
#2
Be aware that you can override the Google CSS, even though they don't explicitly explain how to do it.

Unfortunately, it has to be included in the page otherwise certain elements don't change.
It's a pain but it's better than having the Google washed out blue-grey style.
 

Moses

Well-known member
#6
Be aware that you can override the Google CSS, even though they don't explicitly explain how to do it.

Unfortunately, it has to be included in the page otherwise certain elements don't change.
It's a pain but it's better than having the Google washed out blue-grey style.
Thanks Brogan,
I've been looking at how you achieved done this - passing the classes in the options tag. Noticed you wrote a function, think I'll just embed the CSS in the table call
 

Moses

Well-known member
#8
Brogan, or anyone else, how do I stop the tables taking so much width? Seems Google are inserting a style tag in the header with a hardcoded and massive pixel fixed size?? That massive fixed size seems dependant on my browser size when I load the page, here is the opening HTML rendered for two window sizes

Half size window said:
<table class="google-visualization-table-table" cellspacing="0" style="width: 1113px; "><tbody><tr class="cta_table_row_header"><td class="cta_table_cell_header google-visualization-table-sorthdr">Year<span class="google-visualization-table-sortind">

Full size window said:
<table class="google-visualization-table-table" cellspacing="0" style="width: 1522px; "><tbody><tr class="cta_table_row_header"><td class="cta_table_cell_header google-visualization-table-sorthdr">Year<span class="google-visualization-table-sortind">
 

Moses

Well-known member
#9
I got it close by setting the width property in the options function, it's still 100% but at least it doesn't pop below the floated div to the bottom now

var options = {
'cssClassNames': css,
'allowHtml': true,
'width': 'auto'
};
 

Moses

Well-known member
#10
Latest version avoids strings being terminated early by a ' by changing these to the smart quote equivalent.

Next version to handle dates....
 

Moses

Well-known member
#12
Yeah, currently articles with lots of tables are causing the XenCarta template thingy to timeout... so I'm looking to port it into KingK's BBCode Manager