I want to import an excel file and create pages and sub pages with it.

Closed

Pre purchase question Updated 2 years ago 4 Replies

Ashish asked 2 years ago on June 20, 2023 at 7:36 am

I want to import an excel file and create pages and sub pages with it. sub pages and then further sub pages. So multi level parent and child pages are required. Excel attached. Kindly let me know whether the plugin is helpful or not.

J

James replied Support Agent

2 years ago on June 20, 2023 at 12:21 pm

Hi Ashish,

Based on your current structure it would not be possible to import hierarchy using that file, however if you were to populate the columns as the attached screenshot shows (assignments, post graduate diploma..., semester-1-4, PGDBM) then you could run multiple imports to generate the hierary.

1. Import Column A as page title
2. Import Column B as page title, Column A as parent
3. Import Column C as page Title, Column B as parent
4. Import Column D as page title, Column C as parent
5. ... repeat until hierarchy has been imported.

This should be possible if you are only importing this structure and default wordpress content using the free version: https://wordpress.org/plugins/jc-importer/

I would also recommend exporting the excel doc as csv as it is a more standard format (if not you can install the excel addon https://www.importwp.com/integrations/microsoft-xlsx-file-reader/)

James

AW

Ashish replied

2 years ago on June 27, 2023 at 7:02 am

Hi, I tried doing the same. But when I do the third step i.e.... 3. Import Column C as page Title, Column B as parent Then the Column C is not getting connected as a child of Column B. It shows as a Main Page under their. Can you please share what all settings I need to take care off before submitting. Screenshot attached for reference. Please help. [image: image.png] CVS File [image: image.png] On Tue, Jun 20, 2023 at 5:51 PM Import WP Helpdesk < support@helpdesk.importwp.com> wrote: >
AW

Ashish replied

2 years ago on June 27, 2023 at 7:06 am

Hi, I tried doing the same. But when I do the third step i.e.... 3. Import Column C as page Title, Column B as parent Then the Column C is not getting connected as a child of Column B. It shows as a Main Page under their. Can you please share what all settings I need to take care off before submitting. Files attached for reference. Please help.

J

James replied Support Agent

2 years ago on June 29, 2023 at 9:29 pm

Hi Ashish,

In my example i took the first 100 ish rows from your xlsx file (attached as a csv), and wrote a custom function that has been added using the attached iwp-custom plugin zip.

In the example you will see that i create a custom field called _ref and set this to a unique value based on the items hierarcy, seperated by a - , this is to help the importer understand the hierarcy when looking for its parent.

We also add a filter to skip the record if the current title is empty.

Import #1

Title: {0}
_ref: {0}

Skip: {0} Text Equals

Import #2

Title: {1}
Parent: [iwpex_get_id_from_ref("{0}")]
_ref: {0}-{1}

Skip: {1} Text Equals

Import #3

Title: {2}
Parent: [iwpex_get_id_from_ref("{0}-{1}")]
_ref: {0}-{1}-{2}

Skip: {2} Text Equals

Import #4

Title: {3}
Parent: [iwpex_get_id_from_ref("{0}-{1}-{2}")]
_ref: {0}-{1}-{2}-{3}

Skip: {3} Text Equals

Import #5

Title: {4}
Parent: [iwpex_get_id_from_ref("{0}-{1}-{2}-{3}")]
_ref: {0}-{1}-{2}-{3}-{4}

Skip: {4} Text Equals

Import #6

Title: {5}
Parent: [iwpex_get_id_from_ref("{0}-{1}-{2}-{3}-{4}")]
_ref: {0}-{1}-{2}-{3}-{4}-{5}

Skip: {5} Text Equals

 

I have also uploaded a video showing you the process of importing your xlsx structure using these settings: https://youtu.be/uyTWV9aQHPA