Re: $$Excel-Macros$$ query for getting external data from a website
Thanks dhaval,but how do i use in my project file.can i import all this data in my same project sheet?and i want to import it automatically by changing date and nse symbol in my excel sheet itself.is that also can be done ?? --- On Mon, 12/31/12, Dhaval Shah todhavals...@gmail.com wrote: From: Dhaval Shah todhavals...@gmail.com Subject: Re: $$Excel-Macros$$ query for getting external data from a website To: excel-macros@googlegroups.com Cc: keni...@yahoo.com Date: Monday, December 31, 2012, 12:24 PM Kenil pls click the below mention link to download data of any eq series stocks www.nseindia.com/content/equities/scripvol/datafiles/30-09-2012-TO-28-12-2012TCSEQN.csv www.nseindia.com/content/equities/scripvol/datafiles/30-09-2012-TO-28-12-2012RELIANCEEQN.csv just u have to change the script name ( NSE SYMBOL ) time period for difference stocks On Sun, Dec 30, 2012 at 4:46 PM, Kenil Gala keni...@yahoo.com wrote: Hi, I want data of last 3months of a particular stock from a website. i have link of that website but dont know how to import it.i just want if i change just symbol of that particular script i get the data of that particular script i want. pls find the file attached for details. Pls help Thanks. -- Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups MS EXCEL AND VBA MACROS group. To post to this group, send email to excel-macros@googlegroups.com. To unsubscribe from this group, send email to excel-macros+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros?hl=en. -- Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups MS EXCEL AND VBA MACROS group. To post to this group, send email to excel-macros@googlegroups.com. To unsubscribe from this group, send email to excel-macros+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros?hl=en. -- Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups MS EXCEL AND VBA MACROS group. To post to this group, send email to excel-macros@googlegroups.com. To unsubscribe from this group, send email to excel-macros+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros?hl=en.
Re: $$Excel-Macros$$ query for getting external data from a website
Kenil pls click the below mention link to download data of any eq series stocks www.nseindia.com/content/equities/scripvol/datafiles/30-09-2012-TO-28-12-2012 *TCS*EQN.csv www.nseindia.com/content/equities/scripvol/datafiles/30-09-2012-TO-28-12-2012RELIANCE **EQN.csv just u have to change the script name ( NSE SYMBOL ) time period for difference stocks On Sun, Dec 30, 2012 at 4:46 PM, Kenil Gala keni...@yahoo.com wrote: Hi, I want data of last 3months of a particular stock from a website. i have link of that website but dont know how to import it.i just want if i change just symbol of that particular script i get the data of that particular script i want. pls find the file attached for details. Pls help Thanks. -- Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups MS EXCEL AND VBA MACROS group. To post to this group, send email to excel-macros@googlegroups.com. To unsubscribe from this group, send email to excel-macros+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros?hl=en. -- Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups MS EXCEL AND VBA MACROS group. To post to this group, send email to excel-macros@googlegroups.com. To unsubscribe from this group, send email to excel-macros+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros?hl=en.
Re: $$Excel-Macros$$ query for getting external data from a website
Hi Kenil, Make changes to below code as per your requirement. If you get stuck then let me know. *What you need to do:* -change cURL as per your required time period. -change the range and sheet. -change the query table. Public Const cURL = http://www.forexpros.com/indices/us-spx-500-components; Sub SportExchangeQuery() Application.EnableEvents = False Dim rRange As Range Dim shCountAs Integer Dim lRow As Long Dim ShIndex As Integer ShIndex = 1 shCount = ThisWorkbook.Sheets.Count ThisWorkbook.Sheets(ShIndex).Activate If shCount = 2 Then ThisWorkbook.Sheets(ShIndex + 1).Activate lRow = Range(A65000).End(xlUp).Row + 20 Else lRow = Range(A65000).End(xlUp).Row + 20 End If If lRow 6 Then ThisWorkbook.Sheets.Add After:=Sheets(ShIndex) lRow = Range(A65000).End(xlUp).Row + 2 End If Set rRange = Range(B lRow + 1) rRange.Select rRange.Offset(0, -1).Value = Date rRange.Offset(0, -1).Resize(1, 10).Font.Bold = True rRange.Offset(0, -1).Resize(1, 10).Interior.Color = vbCyan With ActiveSheet.QueryTables.Add(Connection:= _ URL; cURL, Destination:=Range(rRange.Address)) .Name = HOCKEY .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = False .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .WebSelectionType = xlSpecifiedTables .WebFormatting = xlWebFormattingNone .WebTables = 2,3,4,5 .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .WebSingleBlockTextImport = False .WebDisableDateRecognition = False .WebDisableRedirections = False .Refresh BackgroundQuery:=False End With Range(rRange.Offset(1, -1).Address, Range(B63000).End(xlUp).Offset(0, -1).Address).Value = Now ActiveSheet.Columns(A).EntireColumn.AutoFit Call StartTimer Application.EnableEvents = True End Sub On Mon, Dec 31, 2012 at 12:24 PM, Dhaval Shah todhavals...@gmail.comwrote: Kenil pls click the below mention link to download data of any eq series stocks www.nseindia.com/content/equities/scripvol/datafiles/30-09-2012-TO-28-12-2012 *TCS*EQN.csv www.nseindia.com/content/equities/scripvol/datafiles/30-09-2012-TO-28-12-2012RELIANCE **EQN.csv just u have to change the script name ( NSE SYMBOL ) time period for difference stocks On Sun, Dec 30, 2012 at 4:46 PM, Kenil Gala keni...@yahoo.com wrote: Hi, I want data of last 3months of a particular stock from a website. i have link of that website but dont know how to import it.i just want if i change just symbol of that particular script i get the data of that particular script i want. pls find the file attached for details. Pls help Thanks. -- Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups MS EXCEL AND VBA MACROS group. To post to this group, send email to excel-macros@googlegroups.com. To unsubscribe from this group, send email to excel-macros+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros?hl=en. -- Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups MS EXCEL AND VBA MACROS group. To post to this group, send