• Resolved Dayāketu

    (@austmathr)


    Hello!

    I would like to ask for your help on one item. I have a form on my WordPress and this info is stored on the plugin. I wanted to export this into Google Spreadsheet Live Data and since there were too many selected columns I got from IMPORTDATA into cfdbdata. Since I could not make cfdbdata to work I decided to use IMPORTDATA exporting all and then hide the columns that I did not need.

    The problem I have right now, is that for some reason, the columns are shifting. For example, The data that was on column D is no longer on column D, but is now on column C, which is confusing. It makes worse becuase I hid some columns and it appears as if I made visible a previously hidden column and hid a previously visible column (which of course is not the case, it is a matter that the columns shifted).

    I don’t know why columns are shifting with IMPORTDATA. Anyone has encountered this issue and have any suggestions?

    Thanks a lot for your help!
    Best regards,
    David.

    https://ww.wp.xz.cn/plugins/contact-form-7-to-database-extension/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Michael Simpson

    (@msimpson)

    Sounds like a bug in or question for Google.

    Thread Starter Dayāketu

    (@austmathr)

    Thanks for the quick response. One question, is there another option for importing selected columns on Google Spreadsheet? I could not make cfdbdata work, but IMPORTDATA works fine with selected columns.

    I kind of forced to use IMPORTDATA using the columns I wanted modifying the parameters. I’m testing to see if this is stable, but are there any other alternatives instead of using cfdbdata?

    Thanks a lot!

    Plugin Author Michael Simpson

    (@msimpson)

    Can’t you just add a “hide” parameter to the CFDB-generated IMPORTDATA call to avoid exporting those unwanted columns?

    Or does that fail because the resulting URL to fetch is too long (>256 chars)? In that case, if there is a pattern in some or all of the column names that you want to show/hide then you could use a regular expression in place of a column name. That might shorten it a bit. For example, identify “First Name” and “Last Name” columns as “/.*Name/”

    Thread Starter Dayāketu

    (@austmathr)

    Thanks again for the response.

    Good point. If I hide it would be bigger. Even using regex. To be honest, I don’t know why it switch es from IMPORTDATA to cfdbdata. Anyways, below is the original versus the modified version I’m still testing.

    The modified version includes only 7 columns, the only ones I need out of the many in the table. When I select the 4th column on the export dialogue, I get from IMPORTDATA to cfdbdata, so instead of using this I took the export for 3 columns, then adding manually the other 4 columns I needed manually on the URL. Below are the URLs I have on my excel, modified some params for security, but basically I am testing to see if this breaks, but so far so good with my modified version.

    Again, I don’t know why it uses cfdbdata instead of IMPORTDATA, I am sure you know perfectly well, but what I have done is too risky? 🙂

    Original (import all) Complete URL is 204 chars.
    IMPORTDATA(“http://xxxxxxxxxxxxxxx.org/wp-admin/admin-ajax.php?action=cfdb-login&cfdb-action=cfdb-export&form=Solicitud%20de%20Adopci%C3%B3n&orderby=Submitted%20ASC&l=xxxxxxxxxxxxxxxxxxxxxxxx”)

    New one I’m testing. Complete URL is 309 chars
    IMPORTDATA(“http://xxxxxxxxxxxxxxx.org/wp-admin/admin-ajax.php?action=cfdb-login&cfdb-action=cfdb-export&form=Solicitud%20de%20Adopci%C3%B3n&show=Submitted%2Cmc4wp-NOMBRE%2Cmc4wp-APELLIDO%2Cmc4wp-EMAIL%2Cmc4wp-TEL_CASA%2Cmc4wp-TEL_CELU%2CINTERESADO_EN&orderby=Submitted&l=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”)

    Thanks again for all your time and help.
    Best regads,
    David.

    Plugin Author Michael Simpson

    (@msimpson)

    I think I have it switch to cfdbdata when the URL that IMPORTDATA would have to use is too long. IMPORTDATA uses HTTP GET (Params in the URL with max of 255) but the custom cfdbdata puts the Params in POST (no limit). So you might try again to get that to work.

    Usually the problem is login. Try both using the user/password and the the one that hides the password. Maybe one works and he other does not.

    I don’t have the code in front of me right now, but I think there is a commented out line to return raw content that might display better error output.

    Thread Starter Dayāketu

    (@austmathr)

    Cool. So, if my modified IMPORTDATA seems to pull data, then I believe it will continue like that, right?

    I will keep monitoring, but it has been stable for the last hours, so it seems to me that IMPORTDATA with my 309 chars seems to work.

    Thanks!
    Best regards,
    David.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Google Spreadsheet Live Data’ is closed to new replies.