Can I copy Power Query queries to other Excel workbook ?

Can I copy Power Query queries to other Excel workbook ?
I want to copy some Power Query queies to other Excel workbook.
a workbook have some queries about population.
a workbook have some queries about labor market.
I want to build a workbook with population queries and labor market queries for sharing OneDrive.
Regards,
Yoshihiro Kawabata

Thank you, Curt.
Yes, Now I copy by M code.
I want  more easy way.
When sharing Query at Power BI, Excel automatically share all related queries by one click.
Regards,
Yoshihiro Kawabata 

Similar Messages

  • Delete Power Query queries' custom XML data using VBA

    I have Power Query queries in an Excel 2010 file and would like to delete these queries using VBA. so far I can achieve that manually with the following steps:
    unload Power Query addin
    run Document Inspector and click to delete Custom XML data
    The Macro recorder record the following code for step 2.
    Sub Makro1()
    ' Makro1 Makro
    ActiveWorkbook.RemoveDocumentInformation (xlRDIPrinterPath)
    ActiveWorkbook.RemoveDocumentInformation (xlRDIDocumentProperties)
    ActiveWorkbook.RemoveDocumentInformation (xlRDIInactiveDataConnections)
    End Sub
    However, using this macro I do not achieve the same result (=PQ query code gone from the workbook).
    Any ideas on how to achieve the PQ query codes to be removed using VBA?

    On some cases Macro Recording is not complete, and misses to record the full set of VBA to automate the actions you record. This is probably such a case.
    We are looking into future ways to allow you automate Power Query cleanup.
    For the time being, please see if the
    Document Inspector interface can clean the custom XML data (which holds the Power Query data structures).
    thx, Gil.

  • Can I share Power Query's queries to Public ?

    Can I share Power Query's queries to Public ?
    I want to share my queries on my friends.
    Now, I share my queries by sharing Excel files by OneDrive.
    My friends copy and paste queries from my Excel files.
    It hard to search and update rather than Power BI's sharing query.
    Regards,
    Yoshihiro Kawabata

    It's something we're considering but don't support today.

  • Remove Power Query queries while keeping the query output tables

    I use power query to load data from external sources into several excel tables. Before sending this excel to a client, I would like to remove all power query queries (M code) while keeping the output/query tables at place.
    My current workaround is:
    unload Power Query
    convert each table to range
    load Power Query
    delete queries (M code)
    Is there a better/faster way to achieve what I want?

    You can unlink the existing tables and remove custom XML data in Document Inspector. No need to duplicate the worksheet.
    exactly. and even unlinking the tables is not neccessary for DocInspector to remove the custom XML of PQ.
    Do you have any suggestion on how to trigger the cleaning of PQ XML code via VBA? 
    the following code does not work:
    ActiveWorkbook.RemoveDocumentInformation (xlRDIAll)

  • Can I use Power Query to Import a table from Excel sheet range which starts not from the top row?

    Hi,
    Being an experienced Excel user before Power BI, I am just starting to explore the M and Power Query capabilities, and need help already (ain't easy to google this use case somehow):
    I need to import the table which sits in the Excel file with header row in the row 17 of Excel sheet, with some metadata header in the preceding rows of the columns A and B.
    01: Report name, Quick Report
    02: Report Date, 1/1/2014
    17: Employee Name, Manager, etc...
    18: John Doe, Matt Beaver, etc.
    Both (a) direct attempt to load as Excel file and (b) the indirect way through [From Folder] and formula in custom column -- both lead to the same error: "[DataFormat.Error] External table is not in the expected format."
    Specifically, I tried to use the [Power Query -> From File -> From Folder] functionality, select an Excel file and add a custom column to access the binary content: [Add Custom Column] with formula "=Excel.Workbook([Content])".
    It looks like Power Query expects a rectangular range with headers full-width followed by a contiguous table range to import anything, and refuses to load if that is not the case...
    QUESTION: Is there any way to load whatever-formatted data from Excel first, and then manipulate the overall imported range (like referring to rows starting from 17th using "Table.SelectRows" etc.) to read the actual data? Reading and using
    the metadata from header would be a bonus, but that comes second... The main issue is to get something from a non-regular Excel file to later work with using M formulae ...
    Thanks!
    SAM

    Finally found the answer to this one in ():
    You Cannot Open a Password-Protected Workbook
     If the Excel workbook is protected by a password, you
      cannot open it for data access, even by supplying the correct password with
      your connection settings, unless the workbook file is already open in the
      Microsoft Excel application. If you try, you receive the following error
      message:
    Could not decrypt file.
    ANSWER: So, will have either weave in the work with temporary unprotected files or requires opening them before updating the data source (although this almost defeats the purpose of automation...)
    ANSWER to ORIGINAL QUESTION: password was preventing Power Query from reading the Excel file. For solution see above.
    Thanks anyway for participation and inspiration, Imke!

  • How can i copy a dbx executable to other machine to run without installion

    How can i copy a dbx executable to other machine to run without installion whole workshop
    packet??? how to generate a configuration for dbx alone???
    thanks

    Hi, thanks for you help.
    actually, I have once copied dbx to other machine. certainlly, it needs a license. But when I copied
    a license file from the directory /opt/SUNWspro/license-dir/ of machine that installed Workshop
    to another machine that i want to run dbx. dbx starts correctly. but when i type
    $ dbx ipCentrex
    it prints following message:
    dbx: warning: cannot find global initialization file: dbxrc
    /opt/wacos/./.dbxrc[1]: syntax error
    dbx: installation problem, can't find help file: ./SUNW_SPRO_Dbx_help.info
    _find_executable: not found
    To suppress this message, add the following line to your .dbxrc file:
    dbxenv suppress_startup_message 6.2
    Reading ipCentrex
    dbx: warning: setuid program exec()ed. Reattaching
    There might be too many LWP's in this process.
    See `help dbxenv' under mt_scalable.
    dbx: Cannot open lwpstatus.
    dbx: warning: process initialization failed
    dbx: warning: can't find file "/opt/wacos/server/feature_server/bin/obj/ipCentre
    x/ipcentrex_main.o"
    dbx: warning: see `help finding-files'
    when it says that has errors in .dbxrc file, I can remove this file. But the critical error is why it says
    too mamy LWP's in this process? when I debug it at a machine that installed workshop, this error not occurs.
    anyone have answer?

  • Can't copy text from InDesign to other applications

    Hi there,
    Whenever I try to copy text from InDesign to any other applications, it simply fails. When I get to my text editor, email program, Illustrator or Photoshop, it's like the clipboard is empty.
    I'm able to copy shapes and other objects, though. I can also copy entire text boxes, but if I'm copying to Illustrator, for instance, all the lines of text are separated. It's treated as an object and is pretty useless for typical formatting needs.
    I'm on Mac OS X Mountain Lion, using InDesign CS5.
    Can anyone help?
    Thanks!

    Hi all,
    Thanks for replying!
    I tried unchecking "copy PDF", and also quit the only slightly-clipboard related app I use, Quicksilver, but it didn't fix the problem.
    Does anyone have any other ideas?

  • Can't Enable Power Query Add In

    I have the same issue as described by Bill on April 1, 2014.  
    I am using Win-7 Enterprise SP-1 64-bit; MS-Office Professional Plus 2010 ver: 14.0.7140.5000 (32-bit) and have been using Power Query (32-bit) Add-in on Excel for the past 12-18 months.  I have regularly been notified of available PQ upgrades and have
    installed them successfully.
    Yesterday, I opened Excel, but PQ was not enabled.  The Office Add-in manager shows that PQ is disabled.  I attempted to enable the COM Add-In but to no avail. The Add-In location folder for PQ shows (C:Windows\SysWOW64\mscorre.dll).  That
    folder and file is at that location.  Going through the enabling process produces no positive result and no warning message complaints.
    I visited MS Power Query download site, downloaded the latest PQ and ran the install.  I choose all the default responses during the install and got no warning messages.  I an still unable to enable PQ.
    Any help anyone may provide would be appreciated!

    If you go into the registry (through regedit), what is the value of LoadBehavior when you navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\Excel\Addins\Microsoft.Mashup.Client.Excel?
    Is it 0x00000003 (3)?

  • Can i copy a page in an other project?

    Hello, i'm working on mine first muse-site...
    Everything works well..but i want to copy a page from an other project....in stead of making it again all over..
    I'm hope somebody understand what i mean....
    thanks anyway

    Hello Carta,
    You may want to "Select All" and then copy the contents, then paste them in a new page in the new site.
    Cheers
    Parikshit

  • While installing the power query add in Microsoft Excel 2013 through this error?

    Hi frnz,
    while i installing the power query add in excel 2013 i will get the follow error.pls let me knw the reason ,
    Currently my operating system is windows 7 64 bit os service pack 1
     i am the  error msg which am getting .
    Microsoft powerquery for excel(x64) requires the 64bit version of microsoft excel 2010 sp1 or microsoft excel 2013
    plase first install the 64 bit version of microsft excel 2010 sp1 or microsoft excel 2013

    If you are running 32-bit Office, then you must install the 32-bit version of Power Query even if you are running 64-bit Windows.

  • How can I create dynamic file references in Power Query?

    Hi all,
    I'm new at using PowerQuery, and so far I like it. There's one thing I am struggling with though... Once I have set up my PoweQuery connections, I don't find an easy way to change the file to which the query is connecting. I'm using it for a monthyl recurring
    process, and every month the source data to query on woudl be different. The same in format/structure, but just a different dataset.
    Is there a way to make the source setup more dynamic? Can I for example in a parameters sheet enter the name and path of the new source file and update the queries?
    Currently the Advanced editor shows me following file reference:
    let
        Source = Excel.Workbook(File.Contents("Z:\Templates\EMEA\Source Data Tables\EMEA_EW_Source_Data_for_Power_Queries v1.xlsm")),
    Thanks in advance for suggestions

    Yes, this is something that you can do with Power Query. Here's how you can do it:
    Create a table in Excel containing your parameter value. Let's say that it has one column, called ParameterValue, and one row.
    Create a new Power Query query that gets the data from this table. Call the query something like ParameterQuery.
    In your original query you will now be able to reference values from your parameter query by saying something like this:
    Source = Excel.Workbook(File.Contents(ParameterQuery[ParameterValue]{0})),
    HTH,
    Chris
    Check out my MS BI blog I also do
    SSAS, PowerPivot, MDX and DAX consultancy
    and run public SQL Server and BI training courses in the UK

  • How to use Power Query to load data from a single source into multiple tables

    Hi all,
    I have a requirement to load my data into three different data models using Power Query. Is that possible?
    My source is a SharePoint survey list, with similar questions like:
    1) Course lecturer - John Doe
    1a) The course was useful (rate 1 to 5)
    1b) The lecturer displayed good knowledge of topic (rate 1 to 5)
    2) Course Lecturer - Mary Brown
    2a) The course was useful (rate 1 to 5)
    2b) The lecturer displayed good knowledge of topic (rate 1 to 5)
    I would like to split the data into separate data models (one for John Doe; another for Mary Brown), so that I can compare the different lecturers. Other than running separate surveys for each of them, I thought of using Power Query to transform the data.
    Is it possible?
    Thanks.
    Regards
    GM

    Yes, this is possible.
    Start with a single query that returns you the data for all lecturers.
    Right-click on the "all lecturers" query in the queries pane, and choose Reference, once for each lecturer. This will create a query for each lecturer.
    Open the query for each lecturer and filter the data so that only that lecturer's results are visible.
    Click "Close & Load To..." for each lecturer's query  to load the data into the data model. This will create a data model table for each lecturer.
    If your question is more about how to transform such a survey list into a table that can be easily filtered, please provide an example of how the list shows up in Power Query.
    Ehren

  • Sharepoint 2013 support for power query

    Hi,
    I wanted to know whether SharePoint 2013 supports power query and can we refresh power query data from excel services.
    Thanks,
    Bhawna.

    Hi Bhawna.,
    According to your description, my understanding is that you want to know whether SharePoint 2013 support Power Query and refresh power query data from excel services.
    The  refresh of workbooks involving Power Query queries isn't currently available in SharePoint 2013.
    Here are some similar posts for you to take a look at:
    http://social.technet.microsoft.com/Forums/en-US/62b6384e-3120-40e2-9469-01c808530f55/does-sharepoint-2013-have-power-query-services-similar-to-power-pivot-and-power-view?forum=powerquery
    http://social.technet.microsoft.com/Forums/en-US/2da77984-5a97-4102-9119-97ecbc39f527/publish-power-query-workbook-to-sharepoint-2010?forum=powerquery
    In addition, I am not an expert for Power Query, you can create a new thread on the Power Query forum, more experts will assist you with this issue.
    Power Query forum:
    http://social.technet.microsoft.com/Forums/en-US/home?forum=powerquery
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Power Query for Excel login/connection issue.

    Hi all
    I have recently installed Power Query for Microsoft Excel in MS Office 2013.
    I can connect successfully to the all the BI Universes, create queries & design reports in Excel.
    The problem that I have is that I can only do this with the Administrator account. The Admin account is the only account that can connect successfully to the BI universes.
    I have created test user accounts,test groups and assigned security to basically reflect the same rights as the Admin group, but to no avail.
    I have also assigned security to these users & groups on the application level (RESTful Web Service, Universes, Connections) , but no luck.
    It constantly says : "Access to the Resource is forbidden"
    The last thing I want to do is make the users part of the Administrator group. I'm sure you guys would agree that that would be like opening Pandora's Box

    Hi Liang,
    Power Query is part of Excel 2016 and can be found under the Data tab.
    Regards,
    M.

  • Power Query/Data Management Gateway data refresh not working

    Pretty new to o365/Power BI, but here's what I've got going on (hopefully someone can help me out):
    I created a data management gateway and data source.  The data source says it's online in the PowerBI admin center, and it seems to be working correctly.  I can open Excel 2013 on my desktop (logging in as my trial o365 account which has Power
    BI associated with it) and connect to the data source via Power Query using the oData option.  I make sure to import the data into the model, and then open up the PowerPivot window and create a simple pivot table using the data in the model.
    that all works just great.  The problem comes when I upload the workbook and try to update it.  I've tried a few different ways.
    1. When I try to manually refresh the workbook by opening it in my o365 site and going to data-->refresh I get the following error:
          An error occurred while working on the Data Model in the workbook. Please try again.
          We were unable to refresh one or more data connections in this workbook.
          The following connections failed to refresh:
          Connection: Power Query - dbo_DimProductCategory
          Error: Out of line object 'DataSource', referring to ID(s) 'a75593f3-c34d-4f83-9458-49aa2cece164', has been specified but has not been used.
          The following system error occurred: Class not registered
          The provider 'Microsoft.Mashup.OleDb.1' is not registered.
          Power Query - dbo_DimProductCategory
    2. When I go into Power BI and go to "Schedule Data Refresh" for the workbook, I get the following error:
          Sorry, the data connections in this report aren’t supported for Scheduled Refresh.
          Technical Details â–¼
          Correlation ID: B3CE4B10-2137-E593-6FCF-189B73465190
          Date and Time: 03/31/2014 06:20:39 PM (UTC)
    Any help would be greatly appreciated.  If you need additional information, I'd be happy to provide it.

    Hey Guy,
    Thanks for the reply.
    The "data source type" of the data source in Power BI is "SQL Server" (there was only that and Oracle available to select from)
    The "data source type" that Power Query is using in Excel is "From oData Feed"....which is using the Power BI data source....which is using the data management gateway.
    A few follow up questions if you have a second
    1. Do you know when PowerQuery data refresh will be supported? (just a general idea....weeks, months, next year?)
    2. Is there any other way to connect to (and be able to refresh) PowerBI data sources referencing "on prem" data via the data management gateway?  I tried using the oData feed URL in non-PowerQuery areas of excel (excel data tab, PowerPivot directly)
    but it didn't work.  If there's some other way to connect to and refresh on prem data, i'm all ears :D 
    Really appreciate your help, thanks for taking the time.

Maybe you are looking for