How to import data from external webpage connection in MS Access like excel has Data- WebPage - ms-access

Like excel has Data=>From Web to import a table in webpage in excel. How can I achieve this in MS Access? I want to data in table in external web page into the MS Access Table. Just Like we can in excel.
I don't want to use any intermediate excel to import data in Access but direct
external html page data into Access.
I want to import the option chain from NSE India into MS Access.
The external webdata is Option chain from NSE india like in URL:
https://nseindia.com/live_market/dynaContent/live_watch/option_chain/optionKeys.jsp?symbolCode=-10003&symbol=NIFTY&symbol=NIFTY&instrument=OPTIDX&date=-&segmentLink=17&segmentLink=17
This was done in Excel but I want to do it in MS Access.

There is no easy way to do this; Access can get the table from the downloaded file, but it will be confused by the double-line headers. It can ignore one line but not two, thus the headers' second line will be read as data scrambling the real data.
Excel just does a better job isolating the table with its headers and values. Your best option, in my opinion, will be to automate Excel, using it to retrieve the page and build the table. Then, from Access, link the prepared worksheet holding the table.
Alternatively, use the function DownloadFile found in my project at GitHub: VBA.PictureUrl, link the file, and create a query (using the linked file as source) where you clean up and convert the retrieved data as needed.

Related

Create SSRS Subscription to XLTX (Excel Template)

I am trying to get the subscription for SSRS to send the CSV data to an existing Excel template so that the data is formatted to our excel reports and all the conditional formatting in them every morning but it's just creating a new file. How do I send the data to a specific template file?
While SSRS doesn't have built-in functionality for exporting directly to an Excel template, I have a suggestion for a workaround. Use SSRS to export the data in CSV or Excel format. Then, in the Excel template file, go to the Data menu and select Get Data > From File. This lets you use Excel's built-in Power Query functionality to reference the exported file as a data source.
One of the benefits of this approach is that to get fresh data all you need to do is overwrite the data file and then click "Refresh All" in your Excel file. You can also take advantage of the transformation functions that are available in Power Query to avoid repetitive cleanup tasks if needed.

How to modify Access DB File which is in sharepoint Document Library

I am having accdb file(Ms access DB file) in sharepoint Document Library. I want edit the file in browser or without downloading the file to the local.
I am able to view the file but not able to Edit it.
Need help
Access doesn’t really work this way. You can store the data tables in Sharepoint, but you still need the local access file to interact with it. You can link to data tables in Sharepoint. Instead of creating a brand new table, you import the data source.
Microsoft does have a newish program out now called PowerApps that may help you accomplish something closer to what you’re describing.

How to load HTML data into SQL Server (non-table format)?

I'm posting it here because I couldn't' find any such scenario on the web so far. I have a webpage which contains a set of reports both in XLS and PDF formats. I should be downloading the excel files from the page and load into my database. I wish I could use the URL for XLS file directly but the problem is the naming convention may keep changing every time (Sales_Quarter1.xlsx can be Sales_Q1.xlsx the next year). The only thing that would be constant in the following example is "Sales for Calendar Year". I should be looking up for the file that corresponds to this text and download it before loading it into database table.
I would like to know from experts if this would be possible?
<li>
<sub>Sales for Calendar Year 2015--All Countries </sub>
<a href="/Data/Downloads/Documents/Sales/Sales_Quarter1.xlsx">
<sub>[XLS]</sub></a><sub> , <sub>[PDF]</sub><sub>​</sub></sub>
</li>
PS: I am using SQL Server 2014.
Thanks!
Have a look at Integration Services. Create a package for both pulling the web page using a script task, along with a variable name that will represent your downloaded, local filenames for the html file and excel files (you will also have to parse the link out of the html file). Then utilize an Excel Source next in your package.
The variable name for the excel file used in the script task will need to be set to ReadWrite as well.
You can also schedule the resulting package execution via SQL Agent job, if you plan to run this on a reoccurring basis, placing logic into the script or the execution paths,

How can I update LibreOffice Calc cells in real-time from a MySQL database?

I'm looking to write a program to update cells in LibreOffice Calc in real-time (or at least at some fixed tick) with data pulled from a MySQL database. Ideally, when the values in the database are updated, the corresponding cells in the spreadsheet would be updated such that any formulas or calculations existing in calc would continue to operate on the new values. So far, I have yet to find a way to dynamically and programatically insert data in this manner. Is it possible?
The LibreOffice component Base is a database front-end that handles queries, forms, and reports. While by default it uses an embedded version of HyperSQL database to manage the tables, it comes with drivers for any number of other back-end programs, including MySQL.
I think the easiest way to approach this would be to create a Base file with your MySQL database as its back-end (note Base will only be able to see tables and views from MySQL - it won't import queries; although you can save queries in the Base file if you want). Make sure to 'register' the Base file so the rest of LibreOffice can 'see' it. Once the file is registered, any open LibreOffice component can access the data from MySQL (Base file can be closed).
Now you can import any tables or views (from the MySQL component) or queries (from the Base file) into Calc: [Tutorial] Using registered datasources in Calc
Refreshing the imported data can be done through an API call. Here is an example in StarBasic code:
Sub refresh_DBRanges
Dim oDBRangesEnum
Dim oNext
oDBRangesEnum = thisComponent.DatabaseRanges.createEnumeration()
while oDBRangesEnum.hasMoreElements()
oNext = oDBRangesEnum.nextElement()
oNext.refresh()
wend
End Sub
Note in the second posting of the 'registered data sources' tutorial, it gives the API call to set the import ranges on a refresh timer.
Just a note that the Registered DataSources Tutorial is updated further down its page. It says the list of registered data sources can be accessed by hitting F4. That was true once but was changed with version 5. It's now Ctrl+Shft+F4.

Import Excel Data programmatically to access table with column mapping

I am in search of a tool / VBA code snippet that can port my excel data to my access table with effective columns mapping. Anybody please share if you have any idea on these.
Thanks in advance
The standard way to import or link Excel in Access is to use the TransferSpreadsheet method of the DoCmd object. The link is for 2007, but it has been available certainly since 2000, if not before. TransferSpreadsheet includes a HasFieldNames argument.
In Access 2007 you can use External Data/Import/Excel
Just follow the wizard to select the workbook, type of connection, sheet and data.
Data can be imported to a new table, appended to an existing table, or as a linked table
In Access 2003 its File/Get External Data/Import or File/Get External Data/Link tables
select file type .xls and browse to the workbook
if this task is something that u need to perform on a regular basis, you may want to consider creating a macro and scheduled task to perform this automatically. it is very easy to settup and I can outline procedure if need be