1
eric_b
displaying spreadsheets
  • 2004/2/2 1:19

  • eric_b

  • Just popping in

  • Posts: 2

  • Since: 2004/1/30


Hello,

Is there a good way to display spreadsheet data in XOOPS?

I am developing a website using XOOPS2 and I have data that I want to share with registered users. The data is currently in a spreadsheet made in MS Excel (from office 97). I saved the spreadsheet as a html file and it displays nicely on my computer with everything properly placed and the borders/gridlines visible. How do I incorporate this into XOOPS? I tried using Freecontent, but that didn't do too well. The best I have done so far is to create a custom block and paste the html code into the block. It shows the data, but the borders and gridlines are not visible, which makes it a bit hard to read, especially since the whole sheet is wider than the space in my center block, so some of the wider fields wrap to a second line. Is there a module that will help me? is there a better way to develope the custom block? Please keep in mind that I am very new to web development and XOOPS (I have been working on this site for less than a week. Here is a link to the custom block so you can see what I have.http://tinyurl.com/2wk86

Thank-you,
Eric Benner

2
sunsnapper
Re: displaying spreadsheets

The short answer is to find this in your code:


<!-- START OF CONVERTED OUTPUT --> <!-- 
------------------------- --> <
table border>


and change the table tag at the end to say:
<table border="1">



That's the easiest... but, may not have the look you want.

Another option is to adjust your tr tags with the class "even" and "odd" so that they use the colors defined in your CSS for those classes. (If you do this approach, you will probably want to ignore the previous suggestion or set the table border back to "0".)
As an example, it might look like this:
<tr class="even" valign="middle">


(You can look at the Top Posters block here at xoops.org or look at the source to see an idea).

You may find that the excel wizard let's you assign css classes when it does the export. I'm not sure. Anyways, I hope that gets you going.

3
eric_b
Re: displaying spreadsheets
  • 2004/2/3 1:10

  • eric_b

  • Just popping in

  • Posts: 2

  • Since: 2004/1/30


Well, the table border command put a simple border around the whole table, but did nothing to show the grid lines within the table. I also played with different values such as <table border="5"> which gave a thicker border. Good learning for me, but it still seems like there is something missing. If I directly link to the html file, my browser shows the gridlines see;http://tinyurl.com/342z9

would there be somwthing in the css file suppresssing the internal gridlines?

4
kjs222
Re: displaying spreadsheets
  • 2004/2/3 2:19

  • kjs222

  • Friend of XOOPS

  • Posts: 116

  • Since: 2003/3/1 1


from:
http://stupidityinmotion.com/themes/Zaja_Blue/style.css

table td
{
padding: 0;
border-width: 0;
vertical-align: top;
font-family: Verdana, Arial, Helvetica, sans-serif;
}

So, in short; yes: you are right. The bigger question is what are you going to do about it? You most certainly don't want to make the value in the CSS document 1 (that'd be horrific for the rest of your site)... so instead you need to localize the border somehow to this particular table. Unfortunately I'm not great with CSS :(.

So, you have two options:

1. Play around with CSS, and either:

a: alter your html and put in individualized CSS tags for every td, which might overright the problematic global tag (DIRTY solution)
b: create a new CSS class in your CSS document with the correct table definitions and assign this particular table that class... I don't know how to do this properly, but if you're persistant you can probably get it... I recommend copying off of the other specific classes.

or 2. Wait around until someone can tell you the exact code to do it!

In any case, good luck.

Keith

5
sunsnapper
Re: displaying spreadsheets

Try this. In the style.css file (and styleMAC and styleNN) add the following. You can add it about 30+ lines down, as the first td item, if you like, to keep things organized. .css files:
td.spreadsheet {border1px solid #000000;}



Then, in your table tag in the spreadsheet code modify it like this:
<table class="spreadsheet">



I think that should work.

you might find that you need to wrap the whole table in <div class="spreadsheet"> ... </div>
but, my guess is you shouldn't need to.

Login

Who's Online

123 user(s) are online (88 user(s) are browsing Support Forums)


Members: 0


Guests: 123


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits