Access Website & Download files from a Server - html

I am trying to write a VBA macro to download files from our companies server. In order to download the files, I look for their number of our my excel list. E.G. the number is "250". Then I need to search for "250" on the website and then get the objectID of the file.
So the links of the download document looks like this :
https://plm.corp.int:10090/enovia/tvc-action/downloadMultipleFiles?objectId=***4706.39075.61185.44166***&object=250
4706.39075.61185.44166 this number is what I need to find for every of my numbers from excel, in order to edit the download link and get the files.
in the image you can see how it looks in the source code of the website...
Now I have absolutely no idea how I can extract such data our of source code in VBA

#Zwenn
enter image description here
the E2**** is the number out of excel, that i am searching for on the platform.
The 4706 number form my original question, is the unique ID of every E2***number.

Related

Open PDF from file on report server dynamically not just by copying url

Hi I have tried in vain to get a pdf file to open from pdf files in the report server I have saved to a folder. I can create a link using the rs:Command=GetResourceContents when I open the file from report server and copy the URL but I need it to be dynamic so adding the table field name matchesing the pdf name, this opens the folder with all the docs but not open the actual PDF??
Anyone help with this please draining my brain for something I hope is simple.
I have tried this:
file://MyServer/ReportServer/Test/Docs/MyDoc.pdf
This comes back as file not found.
Also I tried action - URL again doesnt open the file just the main folder?
="https://MyServer/ReportServer/Test/="+Fields!Document_Name.Value
Would be good to nail this
thx
I'm not sure I understand what you mean when you talk about a table, but if you wanted a list of PDF's in a folder on SSRS and then wanted to click a link to open them you can do so like this.
Build a report which uses something like the following as the dataset query for a table.
select Path, Name, ItemID from catalog where path like '/My PDF Folder/%'
Then you can build a URL that will open the file directly, and place this expression in a new column in the table.
You have two main options...
="http://myServerName/reportserver?" & Fields!Path.Value & "&rs:Command=GetResourceContents"
or
="http://myServerName/reports/api/v1.0/CatalogItems(" & Fields!ItemID.Value & ")/Model.Resource/Content/$value"
I've not tested this so if there is an issue, let me know and I'll build something to test it against

Converting several html files into one word file

I received web-service documentation in html format, but it is very unfriendly when it comes to search for a specific word. Using index file it displays list of names of each request on the left and when you click on a particular one then on the right it displays description and content of this request.
Unfortunately I have to do some mapping with web-services that we already have. When searching through CTRL + F it only goes trough the left side (list), doesn't matter if you place cursor over the description on the right, click and try to search this way too - it doesn't work.
My idea is to extract all html files that have been provided to us into one word document (this way I can go through descriptions not only trough the list of names). Unfortunately all I can reach is that these files open in separate word files (one html file per one word file). It's almost 1000 requests to be mapped and working this way is going to take forever...
So the question is: How to combine more than one html file into one word file?
There two ways to merge html files
Using Command Line
Copy all html files that you want to merge into a folder.
Navigate to that folder using terminal or command prompt.
Execute following commands
on Mac/Linux
cat *.html > output.html
on Windows :
type *.html > output.html
Using already available tools
https://www.sobolsoft.com/howtouse/combine-html-files.htm, html-merge (Windows Only)
In order to convert merged html file to a word document, read here.

Magento 2.1.1 We can't find required columns: sku

My apologies if a solution has been provided elsewhere. I have searched and could not find anything similar to what I am experiencing. I am trying to upload categories on a Magento CE 2.1.1 website. I have a file with almost 4000 categories and sub categories and the only practical way is to upload via a csv file.
I downloaded a sample file to use and when I upload the same sample file it's working fine when I click Check data" button. However, when I replace the values on the rows with my own and save the file as csv with UTF-8 text encoding, I am getting an error message below. This is also happening when I save the file as csv even without changing the values. I have tested this with a csv file saved from both Mac Numbers and Windows Excel.
I only need to upload Categories (and not products) but I am not sure if this is possible.
File links:
Importing
Not importing
Actual project sample file
The files are quite similar but strangely one is working and the other is not.
Error
We can't find required columns: sku.
Column names: "sku;store_view_code;attribute_set_code;product_type;categories;product_websites;name;description;short_description;weight;product_online;tax_class_name;visibility;price;special_price;special_price_from_date;special_price_to_date;url_key;meta_title;meta_keywords;meta_description;base_image;base_image_label;small_image;small_image_label;thumbnail_image;thumbnail_image_label;swatch_image;swatch_image_label;created_at;updated_at;new_from_date;new_to_date;display_product_options_in;map_price;msrp_price;map_enabled;gift_message_available;custom_design;custom_design_from;custom_design_to;custom_layout_update;page_layout;product_options_container;msrp_display_actual_price_type;country_of_manufacture;additional_attributes;qty;out_of_stock_qty;use_config_min_qty;is_qty_decimal;allow_backorders;use_config_backorders;min_cart_qty;use_config_min_sale_qty;max_cart_qty;use_config_max_sale_qty;is_in_stock;notify_on_stock_below;use_config_notify_stock_qty;manage_stock;use_config_manage_stock;use_config_qty_increments;qty_increments;use_config_enable_qty_inc;enable_qty_increments;is_decimal_divided;website_id;related_skus;related_position;crosssell_skus;crosssell_position;upsell_skus;upsell_position;additional_images;additional_image_labels;hide_from_product_page;bundle_price_type;bundle_sku_type;bundle_price_view;bundle_weight_type;bundle_values;bundle_shipment_type;associated_skus" are invalid
This might be because you opened the file in Excel which will add a BOM to the start of the file. When the Magento importer tries to read the file, it expects the first header/cell to say sku, but it instead sees the BOM.
Two ways to solve this:
1) Don't open it in excel - use Google sheets, or a text editor if you are feeling brave,
2) If you opened the file in excel, close it, open it in notepad++, click encoding up the top and set to "Encode in UTF-8" (NOT "Encode in UTF-8-BOM"). Then save and you are good to go.

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,

Copy folder contents into Access database

I was wondering if anyone might know how to import the contents of a folder into a Access table.
I have a database that's used to make ID cards for students with a unique ID. When students get their photos taken to be printed on these cards, the files are saved as jpegs with the student ID numbers as the filename. (E.g., student 1234567's photo would be saved as 1234567.jpg.) These photos are all saved in the same folder.
I would like to be able to have Access (or a script) automatically generate a table for this folder with two columns: the filename and the image (as a BLOB). That way, I would be able to add a student's photo to his or her data record with a simple SQL query.
My VBA skills are not great (I'm in the process of learning), so any help would be appreciated. Thanks!
There is an MS article: http://support.microsoft.com/kb/103257, however, with the recent version of Access (2010), you would be better to consider the attachment data type which will also allow you to display the photo on a form.