1
Google 스프레드 시트에서 셀 텍스트를 가져 와서 다음 코드를 사용하여 WordPress의 게시물에 삽입하고 있습니다. 하지만 얻을 가치가 300 개 이상 있습니다. 그래서, 300 회 이상 긴 시트 URL을 처리하지 않고 가져 오기가 쉬운 방법인지 궁금합니다. 또한 php
에있을 수 있으므로 내 page.php 파일에 삽입 하겠지만 어떻게해야하는지 잘 모릅니다.Google 스프레드 시트에서 DB 가져 오기
jQuery.ajax("https://docs.google.com/spreadsheets/d/e/2PACX-1vQhp9yFq8eXagN03gn-mCN3_KPWRc2EIpswDFpHJLflFOG-XU2OMktqj03gxvUBZMAp8gYwWO5Q3MVJ/pub?gid=942917560&single=true&range=c3&output=csv").done(function(txt1){
jQuery("#text1").html(txt1);
});
jQuery.ajax("https://docs.google.com/spreadsheets/d/e/2PACX-1vQhp9yFq8eXagN03gn-mCN3_KPWRc2EIpswDFpHJLflFOG-XU2OMktqj03gxvUBZMAp8gYwWO5Q3MVJ/pub?gid=942917560&single=true&range=c4&output=csv").done(function(txt2){
jQuery("#text2").html(txt2);
});
jQuery.ajax("https://docs.google.com/spreadsheets/d/e/2PACX-1vQhp9yFq8eXagN03gn-mCN3_KPWRc2EIpswDFpHJLflFOG-XU2OMktqj03gxvUBZMAp8gYwWO5Q3MVJ/pub?gid=942917560&single=true&range=c5&output=csv").done(function(txt3){
jQuery("#text3").html(txt3);
});
<div id='text1'></div>
<div id='text2'></div>
<div id='text3'></div>
완벽! 고마워. – crloa