Creating a non-Spatial Web App from an Excel Document

1236
3
05-02-2020 07:48 AM
JasonShellhammer
New Contributor
Hello Everyone,
I'm hoping someone can help me.  Our organization is missing a vital resource to help our end-users locate important Survey Plan document data.  I know this would really help the community if able to be created.  I'm picturing an interface or tool that allows very basic search functionality, needs no frills, to get a link to the particular document they need. 
I want to caveat this question/request for any assistance, with an acknowledgement, that my IT skills are not anywhere near the skills, I'm sure that exist on this forum.  But, I'll learn whatever is needed, with a little help.  So below is my question.
I have a catalog of PDFs that sit on an FTP Server, and that catalog has multiple folders (what we refer to as Map Books), Map Books 1-5.  Each Book has 999 pages (numbered 1-999) - (those pages are .PDF documents of survey plans).  My intention is to create a web app interface that lets you search the book and page you want and then click the link to retrieve the .pdf 
Currently, I have an excel document with URLs to the .pdf’s - that reach to this FTP Server (those links have been tested inside the excel and they work).  I have also parsed out all the sortables mentioned above (Book & Page) into individual columns for searching in the excel.
How hard would it be to get that into a web app?  The end goal is to get that resource/app to be consumable in a Hub Site.  Looking for any assistance to get there.  I know there are resources to get there through pay sites, I'm looking to avoid that route.  The tool should be simple enough to operate that folks with very little computer skill, would have no problem searching.
Thank you for your assistance,
Jason
0 Kudos
3 Replies
JimBarry
Esri Regular Contributor

There's probably 1,000 different ways to do this, but this might be a decent start:

https://jimbarry.github.io/mapbook

If you'd rather build the mapbook and map numbers pulldowns on the fly (perhaps the content changes a lot?), I'd recommend converting to CSV or JSON first to make the data easier to use in a web app rather than trying to work with it in Excel format directly. If the content in the sheet doesn't change much, might be easier to hardcode it all in the web app as shown in the sample above.

0 Kudos
JasonShellhammer
New Contributor

Hello Jim,

So what you had showed me is very functional, and essentially all that is needed.  It could look, a bit better, but nothing crazy.  The only thing that would need to be a little different might be the option to type in the Book number and then a Page number, as there are 999 pages in each book.

So, I guess my question is what do you have there, how do I replicate what you made?  Of course with my excel (which I will convert to a CSV)?

The content in the sheet will change from time to time, so it would be helpful to have a loading function so to speak.  That can consume a new CSV.

Thank you,

Jason

0 Kudos
JimBarry
Esri Regular Contributor

Oh yeah, the sample page is raw, totally unstyled, as you saw. Wanted to keep it as simple as I could and leave the styling up to you. 🙂

As for the map number 001-999, sounds like you want a text box instead of a pull-down.  I adjusted the code.  Check the page source behind the app sample I linked above:  https://jimbarry.github.io/mapbook

The changes are on Lines 32-42:

<div>
  <label for="mapnumb">Enter a map number:</label>
  <input type="text" id="mapnumb" value="001">(ie. 001-999)</input> <!-- new -->
    <!--
      <select id="mapnumb">
        <option value="001">001</option>
        <option value="002">002</option>
        <option value="003">003</option>
      </select>
    -->
</div>

Ok so, how to deal with the contents of the Excel spreadsheet that may change from time to time, and which holds the full list of information about map book numbers, map page numbers, and PDF URLs. So, since this is a web page, that information is going to need to be http accessible, or readable by a web browser somehow.

If the number of map books is always going to be 1-N and the number of map pages is always going to be 1-999, and the URL paths to the PDFs are always going to follow some type of consistent naming pattern, like in my sample app above:  "https://<domain>/<folder>/<map-book-number>/<map-number>.pdf", then you don't really need to load the xlsx/csv.  If the mapbook and map number the user enters is valid, at that moment, then it'll return the PDF.

But... if the URL paths to the PDFs don't follow that kind of pattern, then I'm assuming in your xlsx, there's a mapbook column, a map number column, and a column that holds the URL where that map page is.  In which case converting the xlsx into a csv could be a way to go. Here is a sample that shows one way to read the csv.  Then, instead of drawing the csv to the page (like that sample does), you could read it all into a two-dimensional array, then when the user chooses a map book and map number, you do a lookup in that array, pull the correct URL out of the array, and open the PDF in the window.

Tons of different ways to do this. That's just one.

0 Kudos