Modules & VBA :: Importing / Parsing From PDF Into Table

Aug 27, 2014

We publish a PDF file every week full of taskings that our subordinate organizations need to accomplish for the following week. I would like to have parse the PDF and store the data in a table. I think the only way to start this operation is to first save the PDF to Text (Plain) as this create some way to delimit and parse the data. So, once it's saved as a txt file, it basically looks something like this:

Code:
//
Column 1 Data/StuffIDontCareAbout/
StuffIDontCareAbout/StuffIDontCareAbout//Column 2 Data
StuffIDontCareAbout/StuffIDontCareAbout/
Column 3 Data

[Code] ....

...and so on and so forth anywhere between 50-100 more times

The entire text file will always start and end with "//" at the top and bottom. You also see that each tasking paragraph (starting with "Column 1 Data" and ending with "Column 3 Data") is preceded by a "//" on its own line, and also followed by a "//" on its own line. The text file will always look exactly like this with each tasking paragraph having the same number of forward slashes.

Column 1 Data always starts on a new line under "//" and runs until the first "/" (single forward slash).
Column 2 Data always starts after the "//" on the 2nd paragraph line and runs until the end of the paragraph line
Column 3 Data always starts on the 4th paragraph line and runs until the end of the paragraph line

Here's a quick example of what I'm talking about:

Code:
//
37 NOS001/DCO/
TaskPer/TBD//310001ZAUG2014-292359ZSEP2014
GenText/Remarks/
(U/FOUO) This will contain the actual task description and details. You can see that "(U/FOUO)" contains a forward slash.

[Code] ....

So after it's parsed, my table would have the following new rows:

Code:
Column 1 | Column 2 | Column 3
37 NOS001 |310001ZAUG2014-292|(U/FOUO) This will contain
582 NOS012 |280001ZAUG2014-022|(U/FOUO) This another task

View Replies


ADVERTISEMENT

Modules & VBA :: Parsing Array Value To Form

Nov 14, 2013

I am having a problem with parsing the array value to Forms!<arraryvaluehere>.dirty.

Please see the code below:

Public strListOfForms(0 To 2) As String
strListOfForms(0) = "frmForm1"
strListOfForms(1) = "frmForm2"
strListOfForms(2) = "frmForm3"
For i = 0 To 2

Debug.Print CurrentProject.AllForms(strListOfForms(i)).IsLoaded
Debug.Print Forms!strListOfForms(i).Dirty

Next i

Note: CurrentProject.AllForms(strListOfForms(i)).IsLoade d works and Forms!strListOfForms(i).Dirty does not.

Is this because it is taking "strListOfForms(i)" literally? Is there a way that I can get around this?

View 1 Replies View Related

Modules & VBA :: Parsing Multiple Values From A Textbox

Jun 5, 2014

I have a form in which the user has the privilege to download some data from the table.the user will paste some of the numbers to the textbox from the excel in order to download the specific data.i need to write a query to parse the textbox using the in condition

View 12 Replies View Related

Modules & VBA :: Importing A Table Without Knowing Its Name?

Aug 13, 2013

how to import a table using VBA like so:

Code:
Private Sub Command0_Click()
Dim dr As String
dr = Dir("F:SomeFolder*.mdb", vbDirectory)
DoCmd.TransferDatabase acImport, "Microsoft Access", "F:SomeFolder" & dr, acTable, "Table", "Table2"
End Sub

This was just a test to see if I could get an import to work. My problem is that I have a lot of .mdb/.accdb files with similar tables that I need to add into one larger database and these similar tables could have different names in different folders. For example, a file named db1.mdb has a table named tbl. Another file named db2.mdb has a table with all of the same fields, but its called tabX. Furthermore, db2.mdb could even contain a second table that I need to import.

My question is:

Is there a way to simply import all the tables from an access database without knowing any table names using VBA?

View 5 Replies View Related

Modules & VBA :: Importing CSV File Into A Table

Feb 21, 2014

I am trying to import a csv file into a table... it works fine however it put all of the row in just one column ...

DoCmd.TransferText TransferType:=acImportDelim, TableName:="tblTempImport", _
Filename:=CurrentProject.Path & "/xxx.csv", HasFieldNames:=False

And i end up with tblTempImport only having one column F1....

View 14 Replies View Related

Modules & VBA :: CSV File Manipulation - Parsing Data Into Array

Jun 9, 2013

I'm trying to parse the following into an Array by splitting the csv file using a "," comma separator. There should be 63 different data pieces in this File. When I do a count of them from the (ubound array) i only get 54. The last data piece on each row gets concatenated to the first data piece of the next line. Is there a way to stop this from happening? This is causing problems with working with the data.

Date,Open,High,Low,Close,Volume,Adj Close
2013-06-07,1625.27,1644.40,1625.27,1643.38,3371990000,1643 .38
2013-06-06,1609.29,1622.56,1598.23,1622.56,3547380000,1622 .56
2013-06-05,1629.05,1629.31,1607.09,1608.90,3632350000,1608 .90
2013-06-04,1640.73,1646.53,1623.62,1631.38,3653840000,1631 .38
2013-06-03,1631.71,1640.42,1622.72,1640.42,3952070000,1640 .42
2013-05-31,1652.13,1658.99,1630.74,1630.74,4099600000,1630 .74
2013-05-30,1649.14,1661.91,1648.61,1654.41,3498620000,1654 .41
2013-05-29,1656.57,1656.57,1640.05,1648.36,3587140000,1648 .36

View 3 Replies View Related

Modules & VBA :: Importing Excel Data To Access Table

Mar 25, 2015

I have a VBA function to syncsuppliers as below

Function SyncSuppliers()
On Error GoTo errhandle
Filename = DLookup("SupplierPath", "Setup", "SetupActive = True")
If Filename = "" Then
Exit Function
End If
Set xlapp = CreateObject("Excel.Application")

[code]....

The 5th row is where the problem is abbot and co will import n stop missing out the brackets (I need all the data). same for the last row A-BELCO LTD will import (HADAR LIGHTING) does not.

View 2 Replies View Related

Modules & VBA :: Error 2391 When Importing Csv File Into Table?

Jan 29, 2015

I am importing csv files into tables in a batch routine and I get the following error messages. The error number is always 2391.

Field 'F1' Doesn't Exist in Destination Table
Field 'F4' Doesn't Exist in Destination Table
Field 'F36' Doesn't Exist in Destination Table

I understand the first one and can find references to this on the web but the F4 and F36 escape me.

All fields required do actually exist in the table so the real problem is elsewhere.

P.S. I now think that it may be that there are embedded commas in one or more of the text fields and that the number following the 'F' indicates the position of the field in the table. I will check in the morning or create the csv files using commas and quotes.

View 1 Replies View Related

Modules & VBA :: Importing Excel Sheet Into A Table In Database

Jul 23, 2014

I am running this code to import an Excel sheet into a table in my database. This works fine if I set [HasFieldNames] to false. When [HasFieldNames] is set to true, I get the correct field names in the table, but don't get any data from the sheet.

DoCmd.TransferSpreadsheet acImport, , "txlsRevenuePayback", _
"s:ProgramsReportingPayback Revenue Table - Master Copy.xlsx", True, "Actual Revenue By Province!A12000"

View 14 Replies View Related

Modules & VBA :: Automate Importing Xml Data Into Existing Table

May 22, 2014

what is the best way to import the data from the XML file into an access database table. The database I am working with has one large main table where all of the main record data is stored. There is a somewhat complex string of queries and reports based off this table that I am concerned about preserving. The problem is that the XML file is not structured in the same way the table is. The headings are named different, aren't in the same order, etc. I cannot use the import method and simply append it to the main table.After much searching around I have found two options:

1) Use the built in XML import method that access provides to create a secondary table. Then find a way to take data from individual fields in the second table and map and insert it into a new record in the main table.I already have the import part of this option working. The only part I can't seem to understand is how to take data from the second table and get it into a new record in the main table under the correct headings

2) Read the data from the XML file all at once and then map and insert it into the main table.I have not attempted this yet. I was having a hard time understanding how to retrieve the data from the XML file in the first place.

So.. which would be better/easiest to automate (most likely via button click on a form)? I only have a small understanding of VBA and even less understanding of anything XML.

View 5 Replies View Related

Modules & VBA :: Importing CSV File Into Staging Table And Using Headings

Oct 6, 2014

I currently use the following to import a csv file into a staging table and then append and save the data to a table - however it doesnt use the headings from the csv file and creates an error table and a blank record where the headings should be apart from one column where it copies the name.

Would it be possible to use the headings as field names or just omit them completely and use the standard f1 f2 f3 etc access generates in the tmp table?

Code:
With Application.FileDialog(msoFileDialogFilePicker)
.Title = "Select the CSV file to import"
.AllowMultiSelect = False
.Filters.Clear
.Filters.Add "CSV Files", "*.csv", 1
.Filters.Add "All Files", "*.*", 2

[Code] ....

View 1 Replies View Related

Modules & VBA :: Importing Data From CSV File Into Access Table

Jul 19, 2013

Code beneath worked perfectly with Access 2003.Now we switched to Access 2010 and it generates a table where data isn't put into my 77 fields like before, but seperated into 1 field, separated by some ;;;.I am not good with programming.

Dim rst_data As Recordset
Dim oldname As String, newname As String
DoCmd.DeleteObject acTable, "TBL_import_TPXP_Radi_Evvd"
DoCmd.TransferText acImportDelim, , "TBL_import_TPXP_Radi_Evvd", "N:APPLSHAREPRDQSIGMKTDISTPWBUSPB1815RADIEV IMPACT.CSV", False, ""

[code]...

View 2 Replies View Related

Parsing String Into Separate Columns Of A Table

Sep 3, 2007

:confused:

I have a Microsoft Access table with the following columns: A,B,C,D,E,F.
In first row of Column A, I have the following string value: "Al,Peggy,Kelly,Bud,Buck"
What I would like to do is parse this string as such:

Column B:"Al"
Column C:"Peggy"
Column D:"Kelly"
Column E:"Bud"
Column F:"Buck"

Is there a simple VB funtion to accomplish this?

View 1 Replies View Related

Modules & VBA :: Access 2007 / Code For Bulk Importing TXT File Into Separate Records Same Table?

Jul 9, 2014

I have 12,000 cvs that i need to get into An access database so i can start to extract email info etc. They are stored in one folder All Cvs under each of their names edc.txt (i have converted them to .txt) i want to create one table with two fields name (taken from the cv filename and contents (taken fromthe contents of the .txt file). I am using Access 2007.

View 2 Replies View Related

Parsing

Nov 18, 2005

Hi

I have text file which contains different types of Record (identified by RecordType).Its a simple FLAT file having specific record structure for each type of record.

My requirement is
1.Parse the .txt file,identify record type
2.Based on corresponding record structure apply validation rules
3.Generate error report where data violates validation rules.

I am new to access . If any of u have sample code on how to parse any file and show error report accordingly, that will help immensely

Thanks

View 1 Replies View Related

Append Importing Excel Table Into Access Table?

Jun 6, 2007

I have a database with existing tables.I now want to add a whole bunch of records into my access tables.A lot of the data is repeated, and lends itself to my doing it in excel with it's better copy and paste abilities, and it's ability to easily increment alphanumeric fields.I can't seem to succeed in append importing to the bottom of my access table from my excel spreadsheet. All columns are the same.Can this be done, and if so how please?I'm on XP Pro with Office 2003 Pro.I'm also very much a newbie in Access.

View 2 Replies View Related

General :: Importing Data To A Table And Appending To Another Table

Aug 24, 2014

I have to import a file from an external website into a table (tableA) that I have established. The issue is that I don't need all that data, just specific ones (the website does not allow me to select the specific data to export). I created another table (tableB) to capture the data that I require for my report.

How do I take raw data from tableA to append to tableB the required fields that I want?

View 3 Replies View Related

Modules & VBA :: Importing Excel Files

Jul 4, 2015

Access Version 2010
Excel Version 2010

I have 200 excel files in folder C:UsersLburchDocumentsHistoric DataTedan Data in Excel Worksheets - CopyAAA - Copy.The files only have one worksheet and the column format are the same. Worsheet name is different for every file though.Headings in first row.write a macro to import into 1 Access table so I don't have to do it manually.

View 14 Replies View Related

Modules & VBA :: Zip Code Not Importing With Extension

Jun 27, 2014

I have a pretty basic TransferSpreadsheet module that works well except that if the Zip code has the four digit extension, it's not importing.

Option Compare Database

Dim myCheck
Function MeridianLinkFileImport()
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "tbl_MeridianLinkFileImport", "R:DEPT-BRCONSUMER LENDINGMarketing Campaigns2014 Auto Loan PrescreenReport from LoansPQ.xls", True, "Sheet1!A3:AO50000"
End Function

If there is no extention, it is importing fine... 85086 works fine but 85018-4710 doesn't import.

The field is a Short Text data type.

View 3 Replies View Related

Parsing Names??

Apr 11, 2006

I am trying to do the following
If any one of you have experienced Abacus ticketing system, each reservation is comprised of a group of names as follows

1.1 Gul/Mohammad Atif Mr 2.1 Gul/Mohammad Adil Mr
3.1 Bond/James Mr

I have to copy the above data from the abacus tcketing system into a text box.
My question is how can i devide the above three names into three seperate text boxes.

View 4 Replies View Related

Website Parsing

Mar 25, 2008

I need some assistance parsing some information from a web address. Here is an example of what the web address is.-http://www.websitename.com/ct20/pages2/client_bcphone_service_order.aspx?client_id=160399 4&contract_document_id=924182&cipid=206123444-What I am trying to do is get the client ID and the contract id. The client id being 1603994 and the contract id being 924182. Any ideas would be appreciated.Gregg

View 5 Replies View Related

String Parsing.....

Feb 7, 2006

hi, im new to both access and sql and was hoping i could get some help...

i have a string of numbers seperated by commas stored in my database. i need to count how many numbers there are in each string and then display all the results with less than 36 numbers contained.

am i able to do this with an sql statement, or am i likely to need vba??

(example string: 9.89007472991943, 12.3332061767578, 14.4694166183472, 16.287145614624, 17.5347270965576, 17.6327610015869, 16.1364498138428, ...)

thx in advance

View 1 Replies View Related

Parsing Name Fields

Mar 1, 2006

I am using the following statement in an update query (which by the way I found in this forum) to pull out the first name from the FirstName field. The field could have a first name or a first name and a middle initial. If the field has a first name and niddle intital: John P then I get John. If the field only has a first name, I get #Error in the update field. I have thousands of records to move to a new Oracle table which has a first name field and a middle intial field.

FNAME: IIf([FirstName] Is Null," ",Left([FirstName],InStr(1,[FirstName]," ")-1))

Any help would be greatly appreciated.

Thank You:confused:

View 4 Replies View Related

Help Parsing Name Field

Jan 9, 2007

I have a field (Name) that is formatted: lastname, firstname

I need to parse the name field so I can update two fields for firstname and lastname....I have done this before, using left and instr functions, but cannot remember how...can you help?
thank you!
Tricia:)

View 2 Replies View Related

Parsing Names

Apr 24, 2007

Does anyone know of an expression I could use in a query to parse a full name field into last name, first name and middle initial?

View 4 Replies View Related

Parsing Data

Apr 25, 2008

Please Help -

I have a field called MSG_DESC. In this field resides description of various errors i am logging.

I want to exctract only a piece of data from each field. in each field there is a value called SAP#**********

As noted above, it is 10 digits long. Problem is that there is no set place in the description where it is, so right, mid, lft trim does not work.

Can you please assist in how to extract this piece of data from the field.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved