• Resolved jassimp

    (@jassimp)


    Hi Mr. Tobias
    warm greetings and Special thank you for the wonderful plug in that you created called “table press”
    i am very biginer to word press so my question may feel you as childish
    i search all over web for a solution to convert excel to a table and finally i reached to “table press”

    my requirement is i want to use the excel sheet as a database
    so when ever i upload the file to the ftp server, the “table press” will update the data on its table and i want get the table row data by a search form

    the example file attached here and the details mentioned inside

    https://jasimp.com/files/test/contestdata.xlsx

    looking forward for your kind support and advice
    many thanks

    regards

    jasim

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    For this, you have two options:
    The import from the updated file on the server can be achieved by the TablePress Extension from https://tablepress.org/extensions/table-auto-import/
    Then, to have the search run after hitting “Enter”, you could use the approach that I mentioned here: https://www.ads-software.com/support/topic/how-to-trigger-search-when-pressed-enter-key-2/#post-11715109

    Regards,
    Tobias

    Thread Starter jassimp

    (@jassimp)

    Many thanks Mr. Tobias for your prompt support
    i was testing the table auto import extension and its doing great job
    unfortunately my requirement is slight different as i want to auto import the Excel.or CSV file as Append rows to existing table as different users will upload the file to the server and each one should update the table by Append rows to existing table
    the file name that uploading will be same and it will overwrite while uploading to the server. is there any possibility to auto update the table by “Append rows to existing table” method by looking in to the server file creation date and time or any other parameters?
    or is there any option to get search result from more than one table in same page and same search form?

    Also is there any option to import the file from excel to the table list with out log in admin dashboard ( i mean through any password protected page or non admin user profile etc)

    it will be much appreciated if you can advice me for some solution to solve the above requirement

    the search enter option is working fine
    is there any option there to remove the next and previous button form the bottom and add different(minimum 2) filter to the search

    all your help is highly appreciated

    best regards

    Jasim

    • This reply was modified 5 years, 1 month ago by jassimp.
    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for the clarification! Unfortunately, I have to disappoint you for all these things ?? It’s not possible for the import to check the file modification date and then import the file and append the rows. There’s not existing solution for that, I’m afraid. You’d need to develop a custom solution for that, or a custom solution to import from a password-protected page, which uses the TablePress PHP functions.

    You can remove the pagination (Previous and Next), but adding a second (different) filter field would also mean that you need a custom solution that uses the API functions of the DataTables JS library.

    Regards,
    Tobias

    Thread Starter jassimp

    (@jassimp)

    Thank you Mr. Tobias for your reply

    Also is it possible to do pre filled search form through a URL?

    thank you so much for all your support.

    • This reply was modified 5 years, 1 month ago by jassimp.
    • This reply was modified 5 years, 1 month ago by jassimp.
    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    yes, that’s possible in two ways (depending on what type of filter you want). Please see https://www.ads-software.com/support/topic/pass-search-parameters-in-url/ for more.

    Regards,
    Tobias

    Thread Starter jassimp

    (@jassimp)

    Wow that’s a great help

    after this modification while we entering the data through a URL, i am facing one issue that if the searching data is not in the table, then the table header goes one line up and replacing the search box instead of no search data found message.
    Also the header row format changing in to the body row format

    how we can solve this?

    i am using the below short code
    [table_filter id=1 datatables_search_enter=true /]

    is there any way to get the search result only from specific column?

    As i am a WP beginner, all your support is really appreciated

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    you would need the modification (and second TablePress Extension) from https://www.ads-software.com/support/topic/linking-and-filtering-a-table-press-table-from-my-header/#post-4636421

    This is a live filtering then, just as if the user had typed the word into the search field. That can however not be limited to a specific column.

    Regards,
    Tobias

    Hi Tobias,

    Sorry to jump in on the thread, but i was wondering if it is possible to put in authentication credentials to the extension?

    This is because i’d like to be able to use my file server which is a windows based server to host the excel spreadsheets but it will fail as it requires authentication to get into the shares to do so.

    Any ideas?

    Thanks! Craig

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi Craig,

    are you talking about the Auto Import here?
    If you mean HTTP Digest authentication, you could try URLs like

    https://user:[email protected]/your-file.xlsx
    

    Other than that, I’m out of ideas here, sorry. You would need a custom PHP function that can retrieve the data from your server then, as WordPress doesn’t have one natively, from what I know.

    Regards,
    Tobias

    P.S.: Next time, please still open a new thread, as that helps me to separate discussions better. Thanks!

    Thread Starter jassimp

    (@jassimp)

    Thank you Tobias for your great support
    as you advised, i achieved the auto migration of multiple files with a php code.( i am just posting it here if it help for others)
    So the migrated file will auto import to table press by the provided import option

    is there any option form the auto import time interval change as the minimum is 15 minuts on it

    secondly the table press showing all tables before its return to the real setting which is hiding all tables except the first row and header- how i can solve this issue?

    also is there any option to search that the result to view only as full search word met in a table cell?

    thank you`

    
    <?php
    
    /**
     * 7design.studio
     * Merge multiple CSV files into one master CSV file 
     * Remove header line from individual file
     */
    
    $directory = "directory-name-where-multiple-files-to merge*"; // CSV Files Diectory Path
    
    // Open and Write Master CSV File
    $masterCSVFile = fopen('merge.csv',"w+");
    
    // Process each CSV file inside root directory
    foreach(glob($directory) as $file) {
    
        $data = []; // Empty Data
    
        // Allow only CSV files
        if (strpos($file, '.csv') !== false) {
    
            // Open and Read individual CSV file
            if (($handle = fopen($file, 'r')) !== false) {
                // Collect CSV each row records
                while (($dataValue = fgetcsv($handle, 1000)) !== false) {
                    $data[] = $dataValue;
                }
            }
    
            fclose($handle); // Close individual CSV file 
            
            unset($data[-1]); // Remove first row of CSV, commonly tends to CSV header
    
            // Check whether record present or not
            if(count($data) > 0) {
    
                foreach ($data as $value) {
                    try {
                    // Insert record into master CSV file
                    $val =  fputcsv($masterCSVFile, $value, ", " );
                    } catch (Exception $e) {
                        echo $e->getMessage();
                    }
                
                }
    
            } else {
                echo "[$file] file contains no record to process.";
            }
    
        } else {
            echo "[$file] is not a CSV file.";
        }
    
    }
    
    // Close master CSV file 
    fclose($masterCSVFile);
    
    ?>
    
    • This reply was modified 5 years ago by jassimp.
    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    good to hear that you found a solution for the CSV problem!

    Unfortunately, I don’t know a way for the auto import to use intervals that are smaller than 15 minutes. This is a limitation in WordPress, from what I know.

    I’m not sure that I understand the next question about the hiding. Can you explain that maybe with an example or screenshots?

    For the filtering of full words: Do you mean that JavaScript-based filtering on the frontend? Then, no, that’s not really possible, sorry.

    Regards,
    Tobias

    Thread Starter jassimp

    (@jassimp)

    Thank you Joe
    i found below information on two places related to the cron schedule timiing

    wordpress website : wp-cron-scheduling

    other website : how-to-run-a-function-every-5-minutes

    so, we can implement this less timeing ?

    where is the variables applying on table press once the filter changes.

    your help and support always appreciated

    Thread Starter jassimp

    (@jassimp)

    “”I’m not sure that I understand the next question about the hiding. Can you explain that maybe with an example or screenshots?””

    please find the screen shot below

    uploaded image

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    for that hiding issue: It simply takes a few moments for the JavaScript code to be executed, which then hides the undesired extra rows. You could maybe try a CSS solution:

    .tablepress-id-123 tbody td {
      display: none;
    }
    .tablepress-id-123 tbody tr:first-child td {
      display: table-cell;
    }

    (Change 123 to the correct table ID.)
    I haven’t tested this approach though.

    About the cron thing: Interesting to know that they actually go down to 5 seconds! I would however not really recommend that. You could try making the relevant code change in the PHP file of the Auto Import Extension. There, change the two lines

    'interval' => 15 * MINUTE_IN_SECONDS,
    'display' => 'Once every 15 minutes',
    

    to

    'interval' => 5,
    'display' => 'Once every 5 seconds',
    

    Regards,
    Tobias

    Thread Starter jassimp

    (@jassimp)

    thank you Somuch TobiasBg
    unfortunately, the CSS code not worked for me

    the cron worked like a charm- thank you..i set it for 5 minutes.

    i would like to make the cron timing changes on admin panel through the drop down option that you provided. how we can do that by adding the low minutes to the drop down?

    i am able to add it to the drop down .but its not functioning as i dont know where the drop down variable parameters to set.

    is there any option to run the corn manually? i mean updating the table from the server file manually?

    today i faced another issue ??
    i was used the Row Filtering from URL parameter and search enter plug ins
    but now the row filtering parameters not working

    below the code that i used on the table page

    [table_filter id=9 datatables_search_enter=true /]

    could you please advice me how i can solve the issue

    all your support is highly appreciated.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Table press as a database’ is closed to new replies.