Hi janetwang,
Thank you for your interest in wpDataTables.
We check your related URL and we find this https://ibb.co/RYfwk2V
and we can see that table have 123 rows and some data in it.
If this is not what you expect(there are more data in your excel file), please share it with us so we can checkout in our local environment and find what is going on. You can use any upload server like https://wetransfer.com/,https://easyupload.io/ or any other that you use.
Best regards
Hi janetwang,
Link from your drive is not accessible. Can you please change permission to “Anyone with the link” so we can see it or upload your excel file on servers that we share in previous answer?
Best regards.
it is now changed. Pls check it again. Thank you.
Hi janetwang,
Yes now we can access. What we found is that you have a lot of spaces in those three columns where data is not rendered well and because of that datatables treat those columns as the same and then original headers are not right.
What you need to do is to add some code in our plugin. You can do it of FTP or over Plugins editor.
You will need to find file on this path wp-content/plugins/wpdatatables/source/class.wpdatatable.php and around line 1473 you will find this
foreach ($headingsArray as $dataColumnIndex => $dataColumnHeading) {
then below that add this code
$dataColumnHeading = trim(preg_replace('/\s\s+/', ' ', str_replace("\n", " ", $dataColumnHeading)));
so your code will look like this
foreach ($headingsArray as $dataColumnIndex => $dataColumnHeading) {
$dataColumnHeading = trim(preg_replace('/\s\s+/', ' ', str_replace("\n", " ", $dataColumnHeading)));
$namedDataArray[$r][$dataColumnHeading] = $dataRows[$row][$dataColumnIndex];
After that try to create table from your excel file and you should see all data.
This code will be included in next update so you don’t have to worry about that.
Sorry for inconvenience,
Best regards.
hi,
I followed every step you taught to change the code, then my website encounter serious damage, I now cannot activate this plugin,neither deleting it, the system shows the following message.
”
Parse error: syntax error, unexpected ‘&’ in /home3/ofqufomy/public_html/wp-content/plugins/wpdatatables/source/class.wpdatatable.php on line 1474″
Do you mind to just give me the file directly instead let me to correct the code? thank you.
Hi janetwang,
Sorry for inconvenience,
You probably copy some extra characters.
Please download hole file from here and replace it in our plugin.
Best regards.
Hi,
Thank you so much for the file. It now works very well.
best regards,
Hi janetwang,
You are welcome.
I am glad that now everything is working fine.
Have a nice weekend.