2

I built a Table Chart in Google Sheets, and all numerical values except for the last column are displayed as percentages, which is a behaviour I need and want.

View of my sheet (sample of the Table chart):

sheet view

I later published to the web the sheet containing my chart to my GoogleApp. To my dismay, only the 1st column was displayed as percent, and the other were displayed as decimal numbers.

View inside my app (sample of the Table chart):

app view

The developers I work with told me they are just opening the spreadsheet file inside the app from its URL in an iframe tag. What might have caused this difference of behavior between my spreadsheet and its export?


Ok, so I have solved my problem. I have absolutely no clue why there was an issue, and why my fix worked.

All I did was enter the advanced setting of the Chart, and reduce the range of the data I was using. Basically, reducing the range from A1:F300 to A1:F51 was enough. Once I did this, the exported chart in my GoogleApp started being compliant to the one I have in my sheet. The original range had a lot of empty cells, but my new range still has some. Furthermore, a range of 1800 cells doesn't seem that unreasonable to compute for Google Sheet.


9
  • What is "my GoogleApp"? Commented Jul 17, 2015 at 21:46
  • @Rubén a custom GoogleAppEngine application
    – Aserre
    Commented Jul 20, 2015 at 7:37
  • This question is off topic here as it's about a web application development. Commented Jul 20, 2015 at 11:54
  • @Rubén not sure it would be on-topic either on a site like Stackoverflow, as this is not a problem related to a piece of code, but rather the interaction between Google App Engine & Google Spreadsheet
    – Aserre
    Commented Jul 20, 2015 at 12:44
  • How your custom app interact with Google Sheets? Commented Jul 20, 2015 at 21:30

2 Answers 2

0

Ok, so I have solved my problem. I have absolutely no clue why there was an issue, and why my fix worked.

All I did was enter the advanced setting of the Chart, and reduce the range of the data I was using. Basically, reducing the range from A1:F300 to A1:F51 was enough. Once I did this, the exported chart in my GoogleApp started being compliant to the one I have in my sheet. The original range had a lot of empty cells, but my new range still has some. Furthermore, a range of 1800 cells doesn't seem that unreasonable to compute for Google Sheet.

0

Introduction

Before I started to use Google spreadsheets I a similar situation happened to me with Excel.

At that time I learned that when exporting or saving in another format a large number of rows, Excel takes the first 10 rows to infer the format of the whole column. To do this, Excel needs that the cells are not blank nor empty, otherwise the default formatting is applied to the whole column.

I think that this is happening too to Google Sheets and perhaps also to other spreadsheets.

Alternatives

  1. As was already done by the OP, reduce the range by removing rows. The OP reduced the number of rows from 300 to 51.

  2. If you really needs to publish a range with a larger number of rows

    1. Add several auxiliary rows at the top with sample content and formatting. Then you could hide that rows or exclude them of the iframe by naming the range to be published or manually adding the range to the URL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.