Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Meitar

    (@meitar)

    Well, your spreadsheet isn’t a well-formed spreadsheet. You’re using it like a visual layout. If you look at the spreadsheet, you’ll see that every cell of the second row underneath a month name is blank. When the plugin sorts the columns, it does so by sorting the rows in alphabetical order according to that first column. Since no letter, alphabetically speaking, comes before the letter A, all the blank rows get put to the top.

    You probably need to refresh your memory about what spreadsheets are for. I recommend the excellent ExcelShir free videos to start with. Even though his videos talk about Excel, everything he teaches applies to Google Spreadsheets, too.

    If you really want to use the spreadsheet as a visual layout tool just so it displays the cells where you want them to and doesn’t treat the cells like computable data, then at least consider disabling the DataTables part of the plugin (by adding class="no-datatables") to your shortcode.

    Thread Starter kgforce

    (@kgforce)

    Thanks for the prompt reply. I had expected the plugin to respect the original sort/display of the Sheet. If it did that it would be pretty much perfect.

    I will monitor the progress of this plugin development. Best wishes to you.

    Plugin Author Meitar

    (@meitar)

    The plugin does respect the original sort/display of the sheet, you’re just not asking the plugin to do that. You’re asking the plugin to sort alphabetically according to the contents of the first column, so it is sorting alphabetically according to the first column.

    If you ask the plugin not to load its DataTables library by adding class="no-datatables" to your plugin shortcode then the plugin will not try to make sense of your spreadsheet content like computable data, as I already explained above and that you seem to have ignored or yet again failed to understand.

    patsky

    (@patsky)

    kgforce – Can I just chip in here and say that the plugin works perfectly as intended which is to display rows of tabular data which can be sorted, filtered and so on with the option of a straightforward display if those features aren’t needed.

    Looking at your sheets, it seems you have no requirement to sort your data and so the the no-datatables option Meitar describes above would be perfect for you and give you a very good looking layout and let you keep your blank lines. You would never guess that it’s not just straightforward html.

    I have had this exact discussion over spreadsheets with someone who loves using blank lines to create some visual separation in their sheets which is fine if there is never a requirement to sort the data. And there are plenty of times this is true.

    HOWEVER, if you want to search or filter the data then you have to use datatables and therefore remove the blank lines because sorting is assumed.

    This plugin is brilliant. Giving the option of no datatables is a very nice touch and recognises that not everyone uses spreadsheets in the same way.

    Plugin Author Meitar

    (@meitar)

    Thanks for adding that, Pat!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Sorting problem’ is closed to new replies.