[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: ISO Access and Excel Genius



PureBytes Links

Trading Reference Links


Thank 
you I will try this in the next few days and get back to you
 
Lonnie Lepptllepp@xxxxxx 

  <FONT face=Tahoma 
  size=2>-----Original Message-----From: 
  owner-metastock@xxxxxxxxxxxxx [mailto:owner-metastock@xxxxxxxxxxxxx]On 
  Behalf Of James PalmerSent: Monday, January 22, 2001 10:15 
  PMTo: metastock@xxxxxxxxxxxxxSubject: Re: ISO Access and 
  Excel Genius
  Lonnie,
   
  Here is some old code I hacked out of an old excel macro I 
  used to automate importing spreadsheets into Access.  The versions are 
  not current so the code may no longer work if you have the latest version of 
  Access.  By inserting similar code you can automate exporting any number 
  of spreadsheets.
   
  
  Sub Driver()Dim TradingDatabase As 
  Access.Application
   
  Set TradingDatabase = 
  CreateObject("Access.Application")With 
  TradingDatabase    .OpenCurrentDatabase ("C:\My 
  Documents\TheNameOfYourDatabase.MDB")End WithWith 
  TradingDatabase    .DoCmd.TransferSpreadsheet acImport, 
  acSpreadsheetTypeExcel97, "TheDatabaseTableName", "C:\My 
  Documents\TheWorkbookOrSpreadsheetName.XLS", TrueEnd WithSet 
  TradingDatabase = NothingEnd Sub
   
  Basically the spreadsheets have to be uniform or it won't 
  work and you will get an error.  The macro runs form Excel and uses 
  automation to run the process from Access.   If your spreadsheets 
  are not uniform and you want to automate then you've got to use DAO or ADO to 
  slectively export the fields.  If you want to do that and feel up to 
  writing some code I probably can find some that you could use as a model or 
  recommend a book.
   
  Best of luck.  Oh And also any use of this code is at 
  your own risk.
   
  James
   
  <BLOCKQUOTE dir=ltr 
  style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
    ----- Original Message ----- 
    <DIV 
    style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black">From: 
    Lonnie Lepp 
    To: <A 
    href="mailto:metastock@xxxxxxxxxxxxx"; 
    title=metastock@xxxxxxxxxxxxx>metastock@xxxxxxxxxxxxx 
    Sent: Monday, January 22, 2001 9:24 
    AM
    Subject: ISO Access and Excel 
    Genius
    
    I 
    want to take reports generated by William O'Neil's Daily Graphs and combine 
    them into 1 large database. 
    <SPAN 
    class=343314116-22012001> 
    <SPAN 
    class=343314116-22012001>Then I want to filter out the fundamental criteria 
    of the very best stocks available.
    <FONT 
    color=#0000ff> 
    T<SPAN 
    class=343314116-22012001>he following is a list of field 
    names
    <SPAN 
    class=343314116-22012001>Symbol;    Stock 
    Name;    EPS;    RS;    Group 
    RS by Letter ;    Group RS by number;    
    SMR;    Acc/Dis;    Acc/Dis Last 
    Week;    Price;    Price 
    Change;    Vol;    Vol% vs. 
    50maVol;    Industry Group:    Group Ranking 
    current;   Group Ranking Last 
    Week;    Group Ranking 3 months 
    ago;         52 week 
    High;     1 week High;    Prior week 
    High;    Prior week high date;    IBD 
    Page;    Timeliness;    Timeliness last 
    week;  % growth rate;    
    <SPAN 
    class=343314116-22012001> 
    <SPAN 
    class=343314116-22012001><FONT 
    face=Arial>My problem is opening in Access 
    the 18 reports (from Daily Graphs) that these fields come from so that I can 
    combine this data
    <SPAN 
    class=343314116-22012001><FONT 
    face=Arial><SPAN 
    class=343314116-22012001> 
    <SPAN 
    class=343314116-22012001><FONT 
    face=Arial>Once I can combine this data on 
    each stock and its industry group I can the narrow my universe of stocks 
    down to the ones with acceptable (to Me) values.  At that point I want 
    to export a list of Stock Symbols and the stocks name in a tab format that 
    have exceed my minimum vales for each noteworthy 
    field.
    <SPAN 
    class=343314116-22012001><FONT 
    face=Arial><SPAN 
    class=343314116-22012001> 
    <SPAN 
    class=343314116-22012001><FONT 
    face=Arial>Then I can use TC2000 to do 
    further screens and collect the Daily data for export to MetaStock 
    7.02
    <SPAN 
    class=343314116-22012001><FONT 
    face=Arial><SPAN 
    class=343314116-22012001> 
    <SPAN 
    class=343314116-22012001><FONT 
    face=Arial>Daily graphs quickly 
    exports to Excel each individual 
    report
    <SPAN 
    class=343314116-22012001> 
    My 
    problem is to export the initial Excel tables into 
Access
    <SPAN 
    class=343314116-22012001> 
    I 
    use Office 2000 and NT4Sp6
    <SPAN 
    class=343314116-22012001> 
    <SPAN 
    class=343314116-22012001>Any help with this will be 
    appreciated
    <SPAN 
    class=343314116-22012001> 
    I 
    will be glad to share the results of my studies with the 
    group
    <SPAN 
    class=343314116-22012001> 
    
    Lonnie Lepptllepp@xxxxxx 
    <SPAN 
    class=343314116-22012001> 
    <SPAN 
    class=343314116-22012001>