http://docs.google.com
구글Docs의 'Google' 함수로 할 수 있는 것들
구글 함수는 주로 외부 데이터를 스프레드 시트로 불러오는 기능을 한다.
읽어올 수 있는 파일 타입으로는 xml, html, csv, tsv, RSS 와 Atom 피드(RSS와 Atom 피드는 Google Reader로도 가능함)와 같은 것들이 있다. 물론 위 데이터들이 공개된 상태에서만 가능하며 정보제공자측이 방화벽으로 막혀있다면 정보를 불러올 수 없다. 또한 한 스프레드 시트당 50개의 함수만 사용가능하다.
함수의 기능 상세 설명
=GoogleFinance("GOOG"; "price")
이렇게 함수를 이용해 실시간으로 자료를 넣을 수 있다. 현재 나스닥(NASDAQ)과 펀드만을 지원하는데, 펀드는 어떤 시장인지 정확히 모르겠다.
GoogleFinance 함수를 사용하려면 원하는 스프레드쉬트 셀에 다음 수식을 입력하십시오. 구문: =GoogleFinance("symbol"; "attribute");
여기서 'symbol'은 찾고 있는 회사의 주식 기호 또는 뮤추얼 펀드(예: GOOG, QQQ 등)를 나타내고, 'attribute'는 원하는 시장 데이터의 유형(예: 가격, 거래량 등)을 나타냅니다. 'attribute'가 공백으로 있으면 가격은 기본값으로 표시됩니다. 다음은 수식을 사용하는 두 가지 예제입니다.
=GoogleLookup("Paraguay"; "internet users")

구글Docs의 'Google' 함수로 할 수 있는 것들
구글 함수는 주로 외부 데이터를 스프레드 시트로 불러오는 기능을 한다.
읽어올 수 있는 파일 타입으로는 xml, html, csv, tsv, RSS 와 Atom 피드(RSS와 Atom 피드는 Google Reader로도 가능함)와 같은 것들이 있다. 물론 위 데이터들이 공개된 상태에서만 가능하며 정보제공자측이 방화벽으로 막혀있다면 정보를 불러올 수 없다. 또한 한 스프레드 시트당 50개의 함수만 사용가능하다.
함수의 기능 상세 설명
=importXML("URL","query")
- URL - the URL of the XML or HTML file
- query - the XPath query to run on the data given at the URL. For example, "//a/@href" returns a list of the href attributes of all <a> tags in the document (i.e. all of the URLs the document links to). For more information about XPath, please visit http://www.w3schools.com/xpath/
- Example: =importXml("www.google.com", "//a/@href"). This returns all of the href attributes (the link URLs) in all the <a> tags on www.google.com home page
=> <a>태그의 href에 붙은 값들(링크 주소)을 시트에 불러온다.
=importData("URL")
- URL = the URL of the CSV or TSV file. This imports a comma- or tab-separated file.
=ImportHtml("URL", "list" | "table", index)
This imports the data in a particular table or list from an HTML page. The arguments to the function are as follows:
- URL - the url of the HTML page
- either "list" or "table" to indicate what type of structure to pull in from the webpage. If it's "list," the function looks for the contents of <UL>, <OL>, or <DL> tags; if it's "table," it just looks for <TABLE> tags.
- index - the 1-based index of the table or the list on the source web page. The indices are maintained separately so there might be both a list #1 and a table #1.
- Example: =ImportHtml("http://en.wikipedia.org/wiki/Demographics_of_India", "table",4). This function returns demographic information for the population of India.
=ImportFeed("URL", "feedQuery" | "itemQuery", "headers", "numItems")
This function imports an RSS or ATOM feed, just as you can in Google Reader. The arguments to the function are as follows:
- URL - the url of the RSS or ATOM feed
=> RSS나 ATOM 피드의 주소를 입력하면 됨 - feedQuery/itemQuery - one of the following query strings: "feed", "feed title", "feed author", "feed description", "feed url", "item", "item author", "item title", "item summary", "item url", or "item created". The feed queries return properties of the feed as a whole: the feed's title, the feed's author, etc.
- Note: To get the data included in the feed, you need to do an "item" request.
=> feed 관련 쿼리는 다 작동하나 item 관련 쿼리는 작동하지 않는다. feed는 피드와 관련된 제목, 설명, URL등이 보이며, feed url과 같이 상세값까지 적어주면 그 항목만(피드의 주소값만) 노출됨. - the "feed" query returns a single row with all of the feed information.
- the "feed <type>" query returns a single cell with the requested feed information.
- the "items" query returns a full table, with all of the item information about each item in the feed.
- the "items <type>" query returns a single column with the requested information about each item.
- if a query is given that begins with "feed", the numItems parameter isn't necessary and is replaced by the option headers param.
- if a query is given that begins with "item", the numItems parameter is expected as the 3rd param, and headers as the 4th.
- headers - "true" if column headers is desired. This will add an extra row to the top of the output labeling each column of the output.
=> true라고 입력하면 시트에 피드의 제목줄이 표시된다. false로 하면 그 반대 - Example: =ImportFeed("http://news.google.com/?output=atom")
=> 구글 뉴스 RSS 피드를 시트에 불러온다(제목/링크주소/입력날짜 순).
=GoogleFinance("symbol", "attribute")=GoogleFinance("GOOG"; "price")
이렇게 함수를 이용해 실시간으로 자료를 넣을 수 있다. 현재 나스닥(NASDAQ)과 펀드만을 지원하는데, 펀드는 어떤 시장인지 정확히 모르겠다.
GoogleFinance 함수를 사용하려면 원하는 스프레드쉬트 셀에 다음 수식을 입력하십시오. 구문: =GoogleFinance("symbol"; "attribute");
여기서 'symbol'은 찾고 있는 회사의 주식 기호 또는 뮤추얼 펀드(예: GOOG, QQQ 등)를 나타내고, 'attribute'는 원하는 시장 데이터의 유형(예: 가격, 거래량 등)을 나타냅니다. 'attribute'가 공백으로 있으면 가격은 기본값으로 표시됩니다. 다음은 수식을 사용하는 두 가지 예제입니다.
- Google 주식의 현재 거래량을 삽입하려면:
=GoogleFinance("GOOG"; "volume") - Google 주식의 현재 가격을 삽입하려면:
=GoogleFinance("GOOG") and =GoogleFinance("GOOG"; "price") - 또는 주식 기호 및/또는 속성 값을 스프레드쉬트 셀에서 가져올 수 있습니다. 예를 들어, 함수는 다음과 같습니다.
=GoogleFinance(A2, B1)
이런 경우 셀 B1에 문자열로 지정된 속성은 셀 A2의 주식 기호에 대해 반환됩니다.
참고: 수식을 올바르게 계산하려면 'symbol' 및 'attribute'에 모두 따옴표를 사용해야 합니다.
사용할 수 있는 일부 속성
현재 다음 유형의 시장 데이터를 사용할 수 있습니다.
- price: 주식 발행 가격 - 최대 20분까지 지연됨.
- priceopen: 현재 날짜의 주식 시가.
- high: 현재 날짜에 거래된 주식의 최고 가격.
- low: 현재 날짜에 거래된 주식의 최저 가격.
- volume: 현재 날짜에 대한 주식의 거래량.
- marketcap: 주식의 시가총액.
- tradetime: 마지막으로 주식이 거래된 시간.
- datadelay: googleFinance() 함수를 사용하여 주식에 대해 표시되는 데이터의 지연.
- volumeavg: 주식의 평균 거래량.
- pe: 주식의 가격 대 수익률(PER).
- eps: 주식의 주당 순이익(EPS).
- high52: 주식의 52주 상한가.
- low52: 주식의 52주 하한가.
- change: 전날 시장 마감 이후 주식의 가격 변동.
- beta: 주식의 베타 값.
- changepct: 전날 마감 이후 주식 가격의 백분율 변경.
- closeyest: 주식의 전날 종가.
- shares: 주식의 발행 주식 수.
- currency: 주식이 거래되는 통화.
뮤추얼 펀드의 경우:
- closeYest: 뮤추얼 펀드의 NAV.
- date: NAV(순자산가)가 보고된 날짜.
- returnytd: YTD 총 수익.
- netassets: 뮤추얼 펀드의 종가 순자산. 순자산 수치는 특정 펀드의 규모, 민첩성 및 인기도를 측정하는 데 유용한 데이터입니다. 예를 들어 작은 회사의 자산 기반이 곤란한 상황에 도달할 경우 이 회사의 펀드가 여전히 투자 목적 범주에서 유지될 수 있는지 여부를 판별하는 데 유용합니다.
- change: 최근에 기록한 NAV와 그 전의 NAV 사이의 NAV 값 변동.
- changepct: NAV의 % 변동.
- yieldpct: Morningstar는 지난 12개월 동안 배분된 수입을 모두 합한 금액을 최근 월말 NAV로 나눈 다음, 동기에 분산된 자본 이득을 더하여, 배분율(distribution yield)로도 알려진 최종 배당률(End Yield) 수치를 계산합니다. 수입은 고정 수입 증권의 이자 금액과 일반 주식의 배당 금액만을 나타냅니다.
- returnday: 1일 총 수익.
- return1: 1주일 총 수익.
- return4: 4주 총 수익.
- return13: 13주 총 수익.
- return52: 52주 총 수익.
- return156: 156주 총 수익.
- return 260: 260주 총 수익.
- incomedividend: 펀드에 대한 최근 현금 배분 금액.
- incomedividenddate: 상기 항목의 발생 날짜.
- capitalgain: 펀드에 대한 최근 자본 이득 금액.
- capitalgaindate: 상기 항목의 날짜.
- morningstarrating: Morningstar "star" 등급.
- expenseratio: 중개비를 제외하고 펀드에서 발생된 12b-1 보수, 행정비 및 기타 다른 모든 자산 기반 비용을 포함하여 운용비 및 관리비를 지불하는 데 사용된 펀드 자산의 백분율. 펀드 비용은 펀드의 NAV에 반영됩니다. 판매 요금은 지출 비율에 포함되지 않습니다.
참고: 주가지수 및 기타 데이터는 최대 20분까지 지연될 수 있습니다. 정보는 '있는 그대로' 제공되고 거래 목적이나 조언이 아닌 정보 제공 목적으로만 제공됩니다. 자세한 내용은 주가지수 면책사항
을 읽어보십시오.
참고(2): 단일 스프레드쉬트에는 250개의 GoogleFinance 함수만 사용할 수 있으며, 동일한 셀에 있는 2개 함수는 2로 계산됩니다.
=GoogleLookup("entity", "attribute")=GoogleLookup("Paraguay"; "internet users")
영문만 지원하고, 검색 가능한 항목과 속성에 대해선 구글답게 간략한 예만 공개되어있다.
댓글을 달아 주세요