Traderji.com - Discussion forum for Stocks Commodities & Forex

covert data from excel spreadsheet to metstock format

Discuss covert data from excel spreadsheet to metstock format at the Data Feeds within the Traderji.com - Discussion forum for Stocks Commodities & Forex; anil and other senior member can u help me.. by what software i can use ...


Go Back   Traderji.com - Discussion forum for Stocks Commodities & Forex > TOOLS & RESOURCES > Data Feeds

Notices

Data Feeds Real time and end-of-day data feeds.


Advertise Here

Reply
 
Thread Tools
Sponsored Links
  #1  
Old 14th December 2004, 04:47 PM
Member
 
Join Date: Nov 2004
Posts: 36
Appreciation: 20
veneet is on a distinguished road
Default covert data from excel spreadsheet to metstock format

anil and other senior member
can u help me.. by what software i can use to covert real time data from excel spread sheet to metatsock..

thanx
Reply With Quote
  #2  
Old 15th December 2004, 04:19 PM
Moderator
 
Join Date: Jul 2004
Location: Retireville
Posts: 1,596
Blog Entries: 1
Appreciation: 57
CreditViolet will become famous soon enough
Default Re: covert data from excel spreadsheet to metstcok format

Hey vineet,message sent.

CV
Reply With Quote
  #3  
Old 15th December 2004, 11:17 PM
Member
 
Join Date: Sep 2004
Location: Chennai
Posts: 57
Appreciation: 20
snowy is on a distinguished road
Default Re: covert data from excel spreadsheet to metstcok format

Hi,

Can you share it with everybody in this forum ?

Thanks and Regards,
Snowy
Reply With Quote
  #4  
Old 11th January 2005, 08:31 PM
Member
 
Join Date: Jan 2005
Posts: 123
Appreciation: 20
cmlee is on a distinguished road
Default Re: covert data from excel spreadsheet to metstcok format

how to covert data from excel spreadsheet to metstcok format ?
Reply With Quote
  #5  
Old 11th February 2005, 04:47 PM
Member
 
Join Date: Oct 2004
Posts: 11
Appreciation: 20
manojgold is on a distinguished road
Default Re: covert data from excel spreadsheet to metstcok format

Read the downloader help, you can easily conver the data for metastock, downloader simply takes the data & makes the MS files. Remember not to include any quotes any where.
Reply With Quote
  #6  
Old 16th February 2005, 03:00 PM
Member
 
Join Date: Oct 2004
Posts: 11
Appreciation: 20
manojgold is on a distinguished road
Default Re: covert data from excel spreadsheet to metstcok format

Dear Members
What excel does is to craete a text file which the equis downloader converts into metastock. the spreadsheet I am uploading for your convenience. One can see the VB code in the spread sheet and use it it needs the bhavcopy (NSE to be kept in C:\eod directory and the processed txt file is created in C:\Bcopy directory. Once u have the Bhavcopy in C:\eod directory and run the program it makes the file in C:\Bcopy which can be read by equis downloader. Give it a try and let me know. Since I do not find a way to upload the ecel sheet I am copying the VBA here itself. U can simply copy this in your Macro and use it.

Sub ASC2MS()
'
' Macro recorded 08/01/2005 by Manoj
'ActiveWorkbook.CreateBackup = True
'Dim Dte As String
CStart:
Set NewBook = Workbooks.Add
header = Array("<ticker>", "<date>", "<open>", "<high>", "<low>", "<close>", "<vol>")
Range("A1:G1") = header

Call ReadLog(Dte, Bname, MSTxt)
Dte = CDate(Dte) + 1
If Dte > Date Then GoTo EEE
Call BhavCopy(Dte, Bname, MSTxt)

'End If
If Bname = "" Then GoTo EndProg
MsgBox "XXX"
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;" + Bname, Destination:=Range("A2"))
.Name = "Bhav"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 437
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
Range("K2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Range("B2").Select
ActiveSheet.Paste
Range("I2").Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Copy
Range("G2").Select
ActiveSheet.Paste
Range("B3").Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.NumberFormat = "yyyymmdd"
Rows("2:2").Select
Selection.Delete Shift:=xlUp
Columns("H:H").Select
Selection.Delete Shift:=xlToLeft
Selection.Delete Shift:=xlToLeft
Selection.Delete Shift:=xlToLeft
Selection.Delete Shift:=xlToLeft
Columns("B:B").EntireColumn.AutoFit
ActiveWorkbook.SaveAs Filename:=MSTxt, FileFormat:=xlCSV, _
CreateBackup:=False
Range("A1").Select
UpDate:
Open "C:\Bcopy\Asc2Mslog.CSV" For Append As #1
If Dte <= Date Then Write #1, Dte, Bname, Now, MSTxt
Close #1
EEE:
Application.DisplayAlerts = False
ActiveWorkbook.Close
Application.DisplayAlerts = True
If CDate(Dte) <= Date Then GoTo CStart
EndProg:
End Sub
Sub BhavCopy(Dte, Bname, MSTxt) ' creating a valid BhavCopy Name
If Dte > Date Then GoTo Endfile
Set Fs = CreateObject("Scripting.FileSystemObject")
'Bname = ""
'Dte = #1/5/2005#
Bflg = 1

On Error Resume Next 'ErrObject
Do While Bflg > 0
Lstart:
Bname = ""
If Weekday(Dte) = 1 Or Weekday(Dte) = 7 Then Dte = (Dte) + 1 'accounting SAT & Sun
If Weekday(Dte) = 1 Or Weekday(Dte) = 7 Then Dte = (Dte) + 1 'GoTo Nofile
If Weekday(Dte) = 1 Or Weekday(Dte) = 7 Then Dte = (Dte) + 1 'GoTo Nofile
If Dte > Date Then
MsgBox "Date not arrived", 0, Dte '
Bname = ""
MSTxt = ""
GoTo Endfile
End If
tt = Dte
tt = Format(tt, "dd-MMM-yyyy")
ddd = Left(tt, 2)
If ddd < 10 Then dd2 = Mid(Dte, 2, 1) ' To make one digit date
yr = Right(tt, 4)
mnth = UCase(Mid(tt, 4, 3))
MSTxt = "C:\Bcopy\MS" + ddd + mnth + yr + ".Txt"
Bname2 = "C:\Eod\cm" + dd2 + mnth + yr + "bhav.csv"
Bname1 = "C:\Eod\cm" + ddd + mnth + yr + "bhav.csv"
If ddd > 9 Then Bname = Bname1
If Fs.FileExists(Bname2) = True Then Bname = Bname2 'Check whether the file exists or not
If Fs.FileExists(Bname1) = True Then Bname = Bname1 'Check whether the file exists or not
If Fs.FileExists(Bname) = False Then
Dte = Dte + 1
GoTo Lstart
End If
'Err.Number = 0
'Open Bname For Input As #7
'If Err.Number = 53 Then ' If File Not Found
' Dte = (Dte) + 1
' GoTo Lstart
'End If
Nofile:
Bflg = 0
Loop
Endfile:
MsgBox MSTxt, 0, Bname
Close #7
End Sub
Sub ReadLog(Dte, Bname, MSTxt)
Open "C:\Bcopy\Asc2Mslog.CSV" For Input As #1
Input #1, dd1, BNM, dd2, MSNm
Do While Not EOF(1)
If EOF(1) = True Then GoTo NORead
Input #1, DD, Bname, dte2, MSTxt
Loop
NORead:
Dte = CDate(DD)
MsgBox Dte, 0, "Last Conversion Date"
Close #1
End Sub

File ASC2MSLod.csv structure:

LastDate, Bhavcopy,DOC,MStxtFile
#2005-02-15#,"C:\Eod\cm15FEB2005bhav.csv",#2005-02-15 17:06:27#,"C:\Bcopy\MS15FEB2005.Txt"

File Header.CSV structure:
<ticker>,<date>,<open>,<high>,<low>,<close>,<vol >
Reply With Quote
  #7  
Old 20th February 2005, 06:23 PM
Member
 
Join Date: Mar 2004
Location: Ahmedabad
Posts: 133
Appreciation: 20
chheda is on a distinguished road
Default Re: covert data from excel spreadsheet to metstcok format

Sub ReadLog(Dte, Bname, MSTxt)
Open "C:\Bcopy\Asc2Mslog.CSV" For Input As #1
Input #1, dd1, BNM, dd2, MSNm
Do While Not EOF(1)
If EOF(1) = True Then GoTo NORead
Input #1, DD, Bname, dte2, MSTxt
Loop
NORead:
Dte = CDate(DD)
MsgBox Dte, 0, "Last Conversion Date"
Close #1
End Sub

File ASC2MSLod.csv structure:

LastDate, Bhavcopy,DOC,MStxtFile
#2005-02-15#,"C:\Eod\cm15FEB2005bhav.csv",#2005-02-15 17:06:27#,"C:\Bcopy\MS15FEB2005.Txt"

File Header.CSV structure:
<ticker>,<date>,<open>,<high>,<low>,<close>,<vol >
Reply With Quote

In This part of macro replay debag when running
Thanks for VBA
Harish Chheda
Reply With Quote
  #8  
Old 7th March 2005, 07:18 PM
Member
 
Join Date: Feb 2005
Location: all over india but mostly in delhi
Posts: 20
Appreciation: 20
junky is on a distinguished road
Default Re: covert data from excel spreadsheet to metstcok format

Dear Manoj Gold and Chheda,

Thanks for the programme.
I triewd it.
The debugger is showing synext error and other errors too.
In Manoj golds programme last four lines have some error.
In chheddas programmes too it is showing error. I had done cut - paste of the programme.
Can u please Guide furhter.
My email is s.parthsarthi@***************
I shall greatly appreciate ur kind help.

Thanks and regards.
Reply With Quote
  #9  
Old 25th March 2005, 08:35 PM
Member
 
Join Date: Feb 2005
Location: all over india but mostly in delhi
Posts: 20
Appreciation: 20
junky is on a distinguished road
Default Re: covert data from excel spreadsheet to metstcok format

Dear Manoj Gold and Harish,
Unfortunately, I am yet te recieve any response from u.
Can u put ur programme on VBA and try it.

regard from junky
Reply With Quote
  #10  
Old 15th October 2005, 07:01 PM
Member
 
Join Date: Sep 2005
Posts: 3
Appreciation: 20
chiragmparekh is on a distinguished road
Default Re: covert data from excel spreadsheet to metstcok format

Hi Guys, I M A Mcx Dealer.

Can Anyone Help Me In Getting The End Of Day Data For Mcx.
Reply With Quote
Sponsored Links


Reply

Bookmarks


Advertise Here


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads for: covert data from excel spreadsheet to metstock format
Thread Thread Starter Forum Replies Last Post
Need BSE Stock Price List in Electronic form (Excel, CSV format) gharesh End of Day 5 20th June 2008 07:55 PM
How to get realtime data and convert it to metastock format alexonias Data Feeds 21 15th April 2008 11:48 AM
NSE historical Data in csv format rgogada Introductions 14 12th January 2008 07:13 PM
Historical data in hourly / 30-min format Smart Investor Data Feeds 3 29th September 2007 10:34 AM
Free Excel Spreadsheet for Mutual Funds IndianGuru Software 12 19th February 2007 09:00 PM


All times are GMT +5.5. The time now is 09:19 AM.

Indemnity, Disclaimer & Disclosure Notice:
• By visiting Traderji.com you indicate your acceptance of our Forum Rules Disclaimer & Disclosure and indemnify Traderji.com, its associates and related parties of all claims howsoever resulting from the usage of the forum.
Disclaimer: Trading or investing in stocks & commodities is a high risk activity. Any action you choose to take in the markets is totally your own responsibility. Traderji.com will not be liable for any, direct or indirect, consequential or incidental damages or loss arising out of the use of this information.
Disclosure: The information in this forum is neither an offer to sell nor solicitation to buy any of the securities mentioned herein. The writers may or may not be trading in the securities mentioned.
• All names or products mentioned are trademarks or registered trademarks of their respective owners.
General Content Disclaimer Notice:
In light of our policy of encouraging candid, open exchanges of views and the rapid distribution of information originating from many sources, Traderji.com cannot determine the accuracy of information that may be uploaded to the forum. Opinions, advice and all other information expressed by participants in discussions are those of the author. You rely on such information at your own risk. You are urged to seek professional advice for specific, individual situations and not rely solely on advice or opinions given in the discussions. Since Traderji.com is an open and free discussion forum, any comments made by members of this forum in their posts reflect their own views and not of the owner or administrator of Traderji.com. Thus the owner/administrator indemnify themselves of all claims whatsoever and will not be liable or responsible for any members comments/views in this forum Traderji.com. If you find any objectionable or offensive posts made by members of this forum which you would like to bring to our notice for removal then please Contact Us.
 


Copyright © 2001 - 2008, Traderji.com All Rights Reserved.

Recommended Websites - www.TradersEdgeIndia.com - www.TradingPicks.com - www.MasterOfTrading.com