Multi page html table, by letter, then by number ... possible to handle nested queries?

I had seen a worked example of handling html tables spread across multiple pages where there was a logical number on each page here: http://www.powerpivotblog.nl/nba-team-spending-and-their-results-with-excel-powerpivot-and-data-explorer/
Which requires a two-step solution:
1) to alter the query to use Number.ToText
(page) =>let
    Source = Web.Page(Web.Contents("http://website_url/a-z/a/" & Number.ToText(page))),
    Data0 = Source{0}[Data],
    ChangedType = Table.TransformColumnTypes(Data0,{{ etc etc}})
in
    ChangedType
and then 2) to supply a {1..X} parameter on a separate sheet.
let
    Source = Table.Combine(List.Transform({1..30}, Query))
in
    Source
In my example URL above (http://website_url/a-z/a/1), there is also a changing letter component /a-z/a/1, 2, 3, then /a-z/b/1,2,3 etc...
Is there an equivalent way of setting an {a..z} parameter as an outer loop and combine it with the {1..30} loop, by any chance?
Thanks for your help.
Colum

Here are two ways you can reduce the number of privacy prompts:
1) Use the trick Curt mentions here about reducing the number of prompts.
Basically, add a query that uses a formula like:
= {Web.Contents("http://website/"), Web.Contents("http://someOthersite/")}
Then, set the privacy level of http://website/ to Public. After saving the privacy level, you can discard the query.
2) You can enable Fast Combine, which will disable the privacy checks. I do not recommend this approach in general, and you should only enable Fast Combine if you are certain that you can trust your data sources. Also, be extremely cautious about enabling
Fast Combine on workbooks you did not create.
I recommend the first approach.
Sorry, I did not include the navigation and transformation steps in my approach above. To include those steps, it will be nicer to go with the two-step approach to prevent the last function in Websites from being too messy.
For the first step, we can create a function which, given a letter and a page number, grabs the data from the website and performs some transformations on it. It might look something like this:
let
    Source = (letter, pageNumber) => let
        Page = Web.Page(Web.Contents("http://website/" & letter & "/" & Number.ToText(pageNumber))),
        Data0 = Page{0}[Data],
        ChangedType = Table.TransformColumnTypes(Data0,{{"FIELD1", type text}, {"FIELD2", type text}, {"FIELD3", type text}, {"FIELD4", type text}, {"FIELD5", type text}})
    in
        ChangedType
in
    Source
Let's call this query GetWebsiteContents.
For the second step we can generate all of the letter and number combinations we need, and then call GetWebsiteContents on each combination. That may look like this:
let
     Numbers = {1..5},
     Letters = {"a", "b", "c"},
     CreatePair = (page) => List.Generate(() => 0, each _ < List.Count(Letters), each _ + 1, each {Letters{_}, page}),
     LetterNumberPairs = List.Combine(List.Generate(() => 0, each _ < List.Count(Numbers), each _ + 1, each CreatePair(Numbers{_}))),
     Websites = List.Generate(() => 0, each _ < List.Count(LetterNumberPairs), each _ + 1, each GetWebsiteContents(LetterNumberPairs{_}{0}, LetterNumberPairs{_}{1}))
 in
     Websites
I hope this helps.
-Alejandro (MSFT)

Similar Messages

  • How to view all pages of a multi-page HTML email in Mac Mail 5+ (Lion to Mavericks)?

    In previous versions of Mac Mail (up to that included with Snow Leopard, Mail 4), it was possible to scroll through all pages of a multi-page HTML email, like that send from the Tivoli Storage Manager reporting system.
    Since Lion, that has not been possible. The first page displays, but that's it.
    As a possible complication, I'm accessing an Exchange server, not IMAP.
    I have not been able to find a setting that might be related to this, nor have I found anyone who seems to be perturbed by this issue. Perhaps there's very few of us trying to read multi-page Tivoli reports on a Mac.
    In any case, I would prefer not to switch to a different mail app, or sign on to the Outlook Web Service version of our email to see the full report.
    Any thoughts?

    I've been able to find someone willing to do some testing that I can't do without installing old versions of Reader on my computer.  The surprising (to me) result is that the Submit button causes the problem.  By simply removing the Submit button, Reader 10 is now able to print page 1.  The Submit button was set up to do a "mailto".  I don't know whether other destinations also cause the problem of the page not printing with old versions of Reader.

  • Can I create "Multi-Page" Html Articles?

    I'd like to be able to add HTML/Jquery interactivity to my articles without having to break the flow of DPS's normal pages-within-articles navigation. Is there any accomodation for putting multiple html pages into a single article so that you can swipe up-down and get page snapping between them?
    Thanks

    No.
    Neil

  • How to copy and paste a multi-page table of contents?

    Hi everyone.
    I have a large document with a Table Of Contents extending over two pages. I'd like to copy the entire TOC then paste it into a new Pages document.
    I have been able to copy the TOC however when I try to paste it into a new blank Word Processing pages document the following Error message appears: "The table of contents is empty because none of the paragraph styles selected in the Document Inspector are used in the document."
    I can paste it into a blank Page Layout pages document however it pastes it into a text box with only one page of the TOC in it.  Even if the new Page Layout document has two pages and I extend the text box over the two pages only one page of the TOC is copied into the new Page Layout document. At the moment the only work-around I can do is to take a screen shot of each individual page of the TOC and paste them individually into a new pages document. I have tried exporting the entire original document to a plain text file however all the formating is lost (obviously).  I have also tried exporting the entire original document to a Word document (.doc) however it won't let me copy the multi-page TOC and paste it into a new Word document. 
    Is there any way to successfully copy a multi-page table of contents to a new Pages document?

    VQM wrote:
    Thanks Peter.
    PeterBreis0807 wrote:
    The TOC is a hyperlinked text derived from the contents of the file it was generated in.
    You can try exporting the pages the TOC is on as rtf, text or pdf and transferring that, but I would question the value of a TOC for one document being in an entirely different document, which doesn't have what the TOC is pointing to.
    Have you tried copying the T.O.C. Section from the document Thumbnails and pasting into the document Thumbnails of the 2nd document?
    Peter
    How does one export individual pages from a Pages document?
    I've also tried to copy the TOC section from the document thumbnail however I can't figure out how to select multiple pages in the document thumbnails.  It only allows me to select one at a time. Furthermore, when I do select a single page from the thumbnail section and attempt to drag and drop it into the the thumbnail section of the second document it picks up the whole document and wont allow me to move it from the thumbnail section of the original document.
    Shift click to select multiple pages, and I did say Copy and Paste, not drag and drop.
    Peter

  • Multi-page tables crashing in InDesign

    Could anyone please provide some general advice about working with multi-page tables in InDesign, which appear to be very unstable.
    Over the past year or so, my team and I have worked with InDesign 5 and 5.5 on both Mac (10.6) and Windows (XP and 7) machines. In that time we have found if there’s one thing that will cause InDesign to crash it’s a table that runs over several pages and particularly (though not exclusively) if it’s got merged cells.  Add that extra row, merge that extra cell, even just insert your text cursor as you prepare to change some text and InDesign seems to reach a point where the “straw breaks the donkey’s back” and it falls over. At least it usually has the courtesy to reopen at exactly the point where the crash occurs with all the other changes that have been made still in place, whether they have been manually saved or not.
    The really weird thing is that sometimes the same file will crash on all the machines at the same point (as you would expect) but sometimes the files which crash on Windows machines will work fine on Macs and the files which crash on Macs will work fine on Windows machines. There doesn’t appear to be much of a consistent pattern to what’s going on.
    However, the solutions are always the same. First, unmerge any merged cells and adjust the border/fill commands to hide the fact they are now unmerged and then, if that doesn’t work, split the table up into separate chunks and put them into a separate text box on each page - that always seems to fix the problem, although the benefits of linked text boxes are now lost.
    I’ve had a scoot round the web and on these forums and whilst I can find quite a lot of material on this topic, there doesn’t appear to be anything that relates to our issue directly. I realise that I haven’t given specific information on what happens to us because it’s just something that happens every so often and we’re usually working so fast that there’s no time to carry out a detailed analysis of what’s going on, we just fix it and carry on. I’d be grateful if anyone could offer a general overview of what’s happening and maybe suggest some preventative measures we could take to reduce/eliminate the chances of this happening in the future.
    As always, thanks in advance for any and all advice offered.

    Hi folks,
    I have a similar problem with several dokuments running tables over 20 to 30 pages. Since InDesign CS5 I have crashes on random times and issues. I have built up the whole Document from scratch, because I thought saving them from older versions might cause the problem. I have started with a new document editing a table that runs over 5 pages with no merged cells in it which I had before. Now InDesign starts to crash again.
    – It crashes when I type more text than fits in the table cell
    – It crashes when I try to apply the standard paragraph style
    – It crashes altough I have saved an .idml-File to clean it
    – The problem appears in CS6 and CC also
    – I have tried copy/paste to a new document, which worked until I copied a particular table row. Then it started to crash again.
    Something weird I recognized is that all umlauts (I'm writing german text) are shown with wrong symbols in Story Editor (Textmodus) but not in the table itself. Maybe there lies the main problem?

  • Pages will no longer let me open files that I have previously downloaded, worked on and then saved on my mac. However it will let me open pages documents that I have started from new. I need the other documents to open and can't figure it out. PLEASE

    Pages will no longer let me open files that I have previously downloaded, worked on and then saved on my mac. However it will let me open pages documents that I have started from new. I need the other documents to open and can't figure it out. PLEASE

    I just got my mac a month ago so go easy on me but I was just working with the pages that was already on it, and then today I know it updated, and now I am unable to open a lot of my documents!:(  Idk what you mean by the icloud version lol sorry! As for the version, when I open pages from my apps and click 'about' it says version 5.1? And when I open the document it just goes grey and kind of blinks and doesnt open? No error message or any indication of why it will not open now when I for sure have opened it in the past! Andddd for the OS X I think it is 10.9.1 ??

  • How to get the number of rows in a HTML table in some other page

    Hi,
    I am incrementing HTML table rows on button click and saving number of rows in a javascript variable. But on submitting that page I need that number of row value in the following page
    example:
    HTML table is in the page first.jsp
    and the javascript variable having the current row number is row_number
    on submitting it goes to second.jsp page. There i need that row_number value.
    Can anyone help me to solve this?
    regards,
    carry

    function buttonClick()
    var table = profileTable;
    var lnRow = table.rows.length;
    var insertedRow = table.insertRow(parseFloat(lnRow));
    var cell1 = insertedRow.insertCell();
    cell1.innerHTML ="<tr><td><Input type=\"hidden\" >>>name=\"rowNum\" value="+cnt"+></td></tr>";
    document.profileform.submit;
    on submit it goes to the second page, but the value i got using >>>System.out.println("row number from text >>>box"+request.getParameter("rowNum")); is null. What is wrong with >>>my coding. Can anyone solve this.HI carry
    Check the value of bold data
    function buttonClick()
    var table = profileTable;
    var lnRow = table.rows.length;
    var insertedRow = table.insertRow(parseFloat(lnRow));var cnt=inRow
    var cell1 = insertedRow.insertCell();
    cell1.innerHTML ="<tr><td><Input type=\"hidden\" >>>name=\"rowNum\" value="+cnt+"></td></tr>";
    document.profileform.submit;
    }try with it

  • How to populate a html table in a JSF page

    Hi, I need help on the following issue:
    My code calls an business layer API which returns me a string in html format which produces a html table. I have a JSF page with a bunch of other JSF components and I want to insert this html table at the bottom of this page. Is there a way to do it?

    OK
    Here is an example
    Drag an outputText component on to the Page. Check the properties of outputText and uncheck the escape property. Write this some where in the code when you want to display the HTML table on the page.
    String s = "<HTML><BODY><TABLE BORDER=2><TR><TD>No</TD><TD>Name</TD><TD>Age</TD></TR><TR><TD>1</TD><TD>John</TD><TD>30</TD></TR><TR><TD>2</TD><TD>Michael</TD><TD>20</TD></TR></TABLE></BODY></HTML>";
    outputText1.setValue(s);
    I am using the hardcoded value for String but in your case you get the string from some API.
    Hope this helps
    Thanks
    Creator Team

  • When I am on my home screen on the iPhone, swipe left to the search page. Put a letter in the search field. then scroll down. eventually you get to all your texts previously deleted or not. The are all there. How can I clear the entire text from the phone

    When I am on my home screen on the iPhone, swipe left to the search page. Put a letter in the search field. then scroll down. eventually you get to all your texts previously deleted or not. The are all there. How can I clear the entire text from the phone

    When I am on my home screen on the iPhone, swipe left to the search page. Put a letter in the search field. then scroll down. eventually you get to all your texts previously deleted or not. The are all there. How can I clear the entire text from the phone

  • How to create a multi-page collapsible & CSS styleable table of contents box?

    How to create a multi-page collapsible & CSS styleabe table of contents box?
    Is there a tool available for Dreamweaver or for standalone operation that can create for multi-page articles a collapsible & CSS styleabe table of contents box based on the page titles?

    You could do this with jQuery.
    Table of Contents -
    http://www.downloadjavascripts.com/list/javasiteccc68/Details.aspx
    Collapsible Panels, Tables & Accordions -
    http://www.downloadjavascripts.com/Collapsible_And_Free_Accordion_Panels.aspx
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • HT3529 My iMessage isn't working it won't let me sign in, it says verifying then takes me back to the first page, it used to work then just randomly stopped, I've tried everything I can think of to fix it but nothing works help please

    My iMessage isn't working it won't let me sign in, it says verifying then takes me back to the first page, it used to work then just randomly stopped, I've tried everything I can think of to fix it but nothing works help please

    Hi Louis,
    Thanks for visiting Apple Support Communities.
    You may find some of the suggestions in this article helpful with troubleshooting your Messages login:
    FaceTime, Game Center, Messages: Troubleshooting sign in issues
    http://support.apple.com/kb/ts3970
    Best Regards,
    Jeremy

  • Export multi page pdf to excel (searching did not answer my problem)

    I searched the forum and found a few related posts but none have seemed to work for me. I do not use Acrobat much so am not all that familiar with it. I am using Acrobat Professional 8.
    I have a multi page pdf that I want to export to excel. When I choose 'edit > select all' everything highlights. I then right click on the highlighted portion and ask it to 'open table in spread sheet'. It does so but only exports one page of the pdf.
    I have set 'view >page display > single page continuous' but still have had no luck. If someone would help I would greatly appreciate it. Please be specific with menu commands as I may not know where to find something if you just give me the last command.

    Hi,
    Welcome to Adobe Forums.
    You can print a multiple pages of a single PDF file on one page.
    File - Print - Under page size and handling, click on Multiple and then select pages per sheet accordingly.
    You can print through Adobe PDF Printer which will save a new PDF file with multiple pages on single page.
    Once you have this PDF file, then you can export it to TIFF for your application.
    Let me know if this is what you were looking for.
    Please see the screen shot:
    ~ Aditya Kalania

  • Multi-Page Printing in Adobe AIR

    I developed a commercial application for a client in Adobe
    AIR about 3 months ago. Now my client wants to add a printing
    feature. The problem is it requires multi-page printing based on
    the number of rows in a SQLite table.
    BUT I FOUND OUT TO MY AMAZEMENT that I'm limited to less than
    3K vertical pixels (or about less than 3 or 4 pages of printout,
    depending on the vertical size of the page in the set)!
    I was really dumbfounded (AND EMBARRASSED WITH MY CLIENT) to
    see this rather fundamental shortcoming in Adobe AIR. It is
    supposed to revolutionize desktop application development, but
    AIR's lack of such an important printing support as multi-page
    printing is really very disappointing.
    Most desktop applications require and are expected to provide
    multi-page printing. I hope the members of the AIR development team
    are listening to this well-justified criticism and will roll up
    their sleeves and work on it!
    Thanks!

    quote:
    Originally posted by:
    ab1301
    Unfortunately, in this case I think no news is bad news. I
    have seen people mentioning AIR's printing problems all over the
    place, and I haven't seen word 1 from anyone at Adobe. On any other
    issue, the "evangelists" always seem to be out in force. I think
    that means no one is even working on this, and no one wants to talk
    about a negative that doesn't have a fix around the corner or even
    on the horizon. (If you don't have anything good to say, don't say
    anything at all). Its really a shame, since printing is so vital to
    the desktop and AIR is supposed to be the bridge between the
    desktop and web.
    There are a couple bug reports on this issue that you might
    vote for if interested:
    https://bugs.adobe.com/jira/browse/SDK-13895
    https://bugs.adobe.com/jira/browse/ASC-3300
    Of course the status of the bugs is "deferred" and the
    priority is "none," which only reinforces my belief that Adobe
    doesn't intend to address this any time soon.
    If this is true, then its really bad
    I already had selected AIR for my University Project, and If
    adobe doesnt add printing support within 6 months, then im going to
    have a hard time
    Is there any article which talks about those semi printing
    ways like Save to HTML or simialr?

  • Excel issues with importing CSV or HTML table data from URL - Sharepoint? Office365?

    Greetings,
    We have a client who is having issues importing CSV or HTML table data as one would do using Excel's Web Query import from a reporting application.  As the error message provided by Excel is unhelpful I'm reaching out to anyone who can help us begin to
    troubleshoot problems affecting what is normal standard Excel functionality.  I'd attach the error screenshot, but I can't because my account is not verified....needless to say it says "Microsoft Excel cannot access  the file https://www.avantalytics.com/reporting_handler?func=wquery&format=csv&logid=XXXX&key=MD5
    Where XXXX is a number and MD5 is an md5 code.  The symptoms stated in the error message are:
    - the file name or path does not exist
    -The file is being used by another program
    -The workbook you are trying to save has the same name as a currently open workbook.
    None of these symptoms are the case, naturally. The user encountered this with Excel2010, she was then upgraded to Excel2013 and is still experiencing the same issue. The output of this URL in a browser (IE, Chrome, Firefox) is CSV data for the affected
    user, so it is not a network connectivity issue.  In our testing environment using both Excel2010 or 2013 this file is imported successfully, so we cannot replicate.  The main difference I can determine between our test environment and the end-user
    is they have a Sharepoint installation and appear to have Office365 as well.
    So,  my question might more appropriately be for Sharepoint or Office365 folks, but I can't be sure they're  a culprit.  Given this - does anyone have any knowledge of issues which might cause this with Sharepoint or Office365 integrated with
    Excel and/or have suggestions for getting more information from Excel or Windows other than this error message?  I've added the domain name as a trusted publisher in IE as I thought that might be the issue, but that hasn't solved anything.  As you
    can see its already https and there is no authentication or login - the md5 key is the authentication.  The certificate for the application endpoint is valid and registered via GoDaddy CA.
    I'm at a loss and would love some suggestions on things to check/try.
    Thanks  -Ross

    Hi Ross,
    >> In our testing environment using both Excel 2010 and 2013 this file is imported successfully, so we cannot replicate.
    I suspect it is caused by the difference of web server security settings.
    KB: Error message when you use Web query to a secure Web page (HTTPS://) in Excel: "Unable to open"
    Hope it will help.
    By the way, this forum is mainly for discussing questions about Office Development (VSTO, VBA and Apps for Office .etc.). For Office products feature specific questions, you could consider posting them on
    Office IT Pro forum or Microsoft Office Community.
    Regards,
    Jeffrey
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Getting Page Count for a Multi-Page PDF file using Illustrator script?

    Does anyone know how to get the page count of a multi page PDF file?  I know you can then open each page using the PDFFileOptions (pagetoopen).  But I need to know up front how many pages there are to loop thru to open each page and process each page.
    Any Ideas?

    This script i did for photoshop:
    OK so lets do it working on WIN and MAC without any shell script.
    This solution is not the best but its working.
    I used Try catch to solve it.
    Only issue is that you should at least somehow know how many pages you expect in pdf.. this mean if you are working with books or flyers...
    Then set the maxPagesCount to that number.
    I am working with pdfs with max 20pages.. so i start open the 20 then 19 then 18 and when i am success i know the amount of pages.
    Its not the quicker way but its usable.
    var maxPagesCount = 20;
    var actPagesCount = maxPagesCount;
    var opts1 = new PDFOpenOptions();
    opts1.usePageNumber = true;
    opts1.antiAlias = true;
    opts1.bitsPerChannel = BitsPerChannelType.EIGHT;
    opts1.resolution = 10; //it will load faster the test page
    opts1.suppressWarnings = true;
    opts1.cropPage = CropToType.MEDIABOX;
    myFunction = function () {
      try { 
          app.displayDialogs = DialogModes.NO;
          var fileList = openDialog();
          for (i = 0; i < fileList.length; i++) {
            actPagesCount = maxPagesCount;
            getPagesCount(fileList[i],maxPagesCount);
            alert(actPagesCount);
      } catch (exception) { 
        alert(exception);
    getPagesCount = function (checkFile, lastPageID) {
      try {          
        for (var checkPage = lastPageID; checkPage > 0; checkPage--) {
          opts1.page = checkPage;                    
          var docRef = open(checkFile, opts1, false);                  
          docRef.close(SaveOptions.DONOTSAVECHANGES);                  
          actPagesCount = lastPageID;                  
          return;                  
          checkPage=0;                              
      } catch (exception) {
        // Look for next page        
        checkPage--;        
        getPagesCount(checkFile,checkPage);

Maybe you are looking for

  • No information available.

    Hi, when I enter channel no 507 to see whats on BT Sport, all I get is 'no information available'. Anyone know why this is suddenly happening? Been fine foir the sevferal weeks since I first started receiving it.

  • How to create an asm instance manaually? oracle 11gr2.

    env: oracle 11gr2 os: hpux or aix single machine , not rac. question:how to create an asm instance manaually?? diskgroup,listener,db ,they can be resigistered to crs?? can anyone give me document about it?

  • HTML Snippet Does not Publish to where it is placed in original

    The HTML Snippet does not publish on the page where I place it on my original in iWeb 08. Does anyone know how to figure out where and how to make this work without guessing constantly. It seems that it shifts it many lines up on the published page.

  • Trying to make a PXE install

    Hi, I want to learn how to make a PXE install and  I am using Virtualbox for that. I read the wiki but I can't make it work. I think the mistake is in my dhcp config file. See: #option definitios common to all supported networks... option domain-name

  • Partner Function YS not defined

    Dear Friends, We have applied support pack SAPKH47022 as per SAP recommendation. Now when we are creating sale order its giving a Warning Message as "Partner Function YS not defined" we can neglect the message and can go forward, but we have some cus