Data analysis starts with MySQL (Python) (14, crawler 40-day weather, MongoDB, Excel)

(Source web page:http://www.weather.com.cn/ China Weather Network, js extraction,Due to work needscrawlingforty-day temperature forecastandfifteen days Weather forecastandsave to Excel) (China Weather Network also has fifteen-day weather The prediction was not accurate enough, so I chose Baidu Weather’s 15-day forecast. The data from Baidu Weather is not released here. xff09;) (Insert into two databases,mongoDB, mysql)(If necessary, I will introduce the code for inserting mysql later& #xff09; Table of Contents Preparation: Part One:Dictionary Insertion into MongoDB(mysql& #xff09; Target web page Parameter introduction request function, request header description parse function, return request function Calculate the forty-day date Get the region and region code save() Save the dictionary to the MongoDB database Part 2&#xff1a ;All source codes Note: Forty-day weather results chart: Preparation: City and City Code; There are too many,Here are only six to test;I will upload the resource site,There are many online and you can find them by yourself(Under review,If passed, link will be given&#xff09 ; Part 1:Dictionary Insertion into MongoDB(mysql) Note: 1. Using the weather forecast as a reference , does not participate in the main data analysis work, therefore uses the original code Method of inserting into the mongoDB database (The source code found on the Internet has been modified with…

javaword,excel,ppt to pdf

Preparation 1. Download jacob.jar Link: https://pan.baidu.com/s/1TWIGyX9A3xQ6AG9Y3mVlVg Extraction code: abcd 2. Download and install wpsWPS Office-Supports multiple people to edit multiple document formats online_WPS official website 3. Add jar to the project and ddl file in jre/bin of jdk directory, remember whether your system is 64-bit or 32-bit Put the ddl file in the jdk directory If the system has not set up javahome, remember to set it up path plus 4. Add jacob.jar to the project. I use the idea springboot maven project and execute maven to package it into the project mvn install:install-file – Dfile=d:\jacob.jar -DgroupId=com.jacob -DartifactId=jacob -Dversion=1.19 -Dpackaging=jar Replace the red font with your own com.jacobjacob1.19 5. After the preparations are completed, let’s add the code import com.jacob.activeX.ActiveXComponent;import com.jacob.com.Dispatch;public class ToPdfTest {private static final int wdFormatPDF = 17;private static final int xlsTypePDF = 0;private static final int ppSaveAsPDF = 32;public static void main(String[] args) {String path = “D:\\222.ppt”; //Place the file that needs to be converted in the corresponding location String pdfPath = “D:\\test222.pdf”;// pdfPath is the path to the generated PDF file //boolean bo = ToPdfTest.wordtoPDF(path, pdfPath); //word transfer //boolean bo = ToPdfTest.exceltoPDF(path, pdfPath); //excel to boolean bo = ToPdfTest.ppttoPDF(path, pdfPath);if (bo) {System.out.println(“Congratulations, the conversion is completed!”);}…

Java operates Word, Excel, Access, IE, OutLook, PDF, etc.

Recently, I found that there are a lot of questions in this area. I spent some time, found some information, and compiled a simple example of Java operation PDF http://www.lowagie.com/ Java operation Word ,Excel,access reference: http://danadler.com/jacob/ http://jakarta.apache.org/poi/ http://www.onjava.com/pub/a/onjava/2003 Recently, I found that there are a lot of questions in this area. I spent some time, found some information, and compiled a simple example. Java operation PDF http://www.lowagie.com/ Java operation of Word, Excel, accessReference:http://danadler.com/jacob/http://jakarta.apache.org/poi/http: //www.onjava.com/pub/a/onjava/2003/01/22/poi.Html http://www.csdn.net/develop/article/15/15311.shtm http://forum.java.sun.com/thread.jsp?forum=40&thread=382666&tstart=0&trange=15  An example of Jacob operating Word, an example of operating Excel, Access, OutlookJacob’s There are in the sample directory: import java.io.File; import com.jacob.com.*; import com.jacob.activeX.*; public class WordTest {  public static void main(String[] args) {   WordBean word=new WordBean();   word.openWord(true);   word.createNewDocument() ;   word.insertText(“Hello word.”);   }  }     import com.jacob.activeX.*; > Import com.jacob.com.*; public class WordBean extends java.awt.Panel { PRivate ActiveXComponent MsWordApp = null; private Dispatch document = null;<br //Open Word if we public void openWord(boolean makeVisible) ‘ve not done it already if (MsWordApp == null)   {   MsWordApp = new ActiveXComponent(“Word.application”);   } //Set the visible property as required.   //Find the Documents collection object maintained by Word   Dispatch documents =    Dispatch.get(MsWordApp,”Documents”).toDispatch();  //Call the Add method of the Documents collection to create  //a new document to edit document = Dispatch.call(documents,”Add”).toDispatch();  } public void insertText (String textToInsert)  {  // Get the current selection within Word at the…

Java operates Word, Excel, Access, IE, OutLook, PDF, etc.-mysql tutorial

Recently, I found that there are a lot of questions asked in this area. I spent some time, found some information, and compiled a simple example of Java operation PDF http://www.lowagie.com/ Java operation Word ,Excel,Access reference: http://danadler.com/jacob/ http://jakarta.apache.org/poi/ http://www.onjava.com/pub/a/onjava/2 Recently, I found that there are a lot of questions asked in this area. I spent some time, found some information, and compiled a simple example JavaOperationPDF http://www. lowagie.com/ JavaOperationWord,Excel,Access Reference: http://danadler. com/jacob/ http://jakarta.apache.org/poi/ http://www.onjava.com/pub/a/onjava/2003/ 01/22/poi.html http://www.csdn.net/develop/article/15/15311.shtm http://forum.java. sun.com/thread.jsp?forum=40&thread=382666&tstart=0&trange=15 An example of jacobOperationWord,OperationExcel, Access , the Outlook example jacob’s sample directory contains import java.io.File; import com.jacob.com.*; import com.jacob.activeX.*; public class WordTest { public static void main(String[] args) { WordBean word =new WordBean(); word.openWord(true); word.createNewDocument(); word.insertText(“Hello word .”); } } import com.jacob.activeX.*; import com. jacob.com.*; public class WordBean extends java.awt.Panel { private ActiveXComponent MsWordApp = null; private Dispatch document = null; public WordBean() { super(); } public void openWord(boolean makeVisible) { //Open Word if we’ve not done it already if (MsWordApp == null) { MsWordApp = new ActiveXComponent(“Word.Application”); } //Set the visible property as required. Dispatch.put(MsWordApp, “Visible”, new Variant(makeVisible)); } public void createNewDocument() { //Find the Documents collection object maintained by Word Dispatch documents = Dispatch.get(MsWordApp,”Documents”).toDispatch(); //Call the Add method of the…

Java operates Word, Excel, Access, IE, OutLook, PDF, etc.

Recently, I found that there are a lot of questions asked in this area. I spent some time, found some information, and compiled a simple example of Java operation PDF http://www.lowagie.com/ Java operation Word ,Excel,Access reference: http://danadler.com/jacob/ http://jakarta.apache.org/poi/ http://www.onjava.com/pub/a/onjava/2 Recently, I found that there are a lot of questions asked in this area. I spent some time, found some information, and compiled a simple example JavaOperationPDF http://www. lowagie.com/ JavaOperationWord,Excel,Access Reference: http://danadler. com/jacob/ http://jakarta.apache.org/poi/ http://www.onjava.com/pub/a/onjava/2003/ 01/22/poi.html http://www.csdn.net/develop/article/15/15311.shtm http://forum.java. sun.com/thread.jsp?forum=40&thread=382666&tstart=0&trange=15 An example of jacobOperationWord,OperationExcel, Access , the Outlook example jacob’s sample directory contains import java.io.File; import com.jacob.com.*; import com.jacob.activeX.*; public class WordTest { public static void main(String[] args) { WordBean word =new WordBean(); word.openWord(true); word.createNewDocument(); word.insertText(“Hello word .”); } } import com.jacob.activeX.*; import com. jacob.com.*; public class WordBean extends java.awt.Panel { private ActiveXComponent MsWordApp = null; private Dispatch document = null; public WordBean() { super(); } public void openWord(boolean makeVisible) { //Open Word if we’ve not done it already if (MsWordApp == null) { MsWordApp = new ActiveXComponent(“Word.Application”); } //Set the visible property as required. Dispatch.put(MsWordApp, “Visible”, new Variant(makeVisible)); } public void createNewDocument() { //Find the Documents collection object maintained by Word Dispatch documents = Dispatch.get(MsWordApp,”Documents”).toDispatch(); //Call the Add method of the…

Java operates Word, Excel, Access, IE, OutLook, PDF, etc.

Recently, I found that there are a lot of questions in this area. I spent some time, found some information, and compiled a simple example of Java operation PDF http://www.lowagie.com/ Java operation Word ,Excel,access reference: http://danadler.com/jacob/ http://jakarta.apache.org/poi/ http://www.onjava.com/pub/a/onjava/2003 Recently, I found that there are a lot of questions in this area. I spent some time, found some information, and compiled a simple example. Java operation PDF http://www.lowagie.com/ Java operation of Word, Excel, accessReference:http://danadler.com/jacob/http://jakarta.apache.org/poi/http: //www.onjava.com/pub/a/onjava/2003/01/22/poi.Html http://www.csdn.net/develop/article/15/15311.shtm http://forum.java.sun.com/thread.jsp?forum=40&thread=382666&tstart=0&trange=15  An example of Jacob operating Word, an example of operating Excel, Access, OutlookJacob’s There are in the sample directory: import java.io.File; import com.jacob.com.*; import com.jacob.activeX.*; public class WordTest {  public static void main(String[] args) {   WordBean word=new WordBean();   word.openWord(true);   word.createNewDocument() ;   word.insertText(“Hello word.”);   }  }     import com.jacob.activeX.*; > Import com.jacob.com.*; public class WordBean extends java.awt.Panel { PRivate ActiveXComponent MsWordApp = null; private Dispatch document = null;<br //Open Word if we public void openWord(boolean makeVisible) ‘ve not done it already if (MsWordApp == null)   {   MsWordApp = new ActiveXComponent(“Word.application”);   } //Set the visible property as required.   //Find the Documents collection object maintained by Word   Dispatch documents =    Dispatch.get(MsWordApp,”Documents”).toDispatch();  //Call the Add method of the Documents collection to create  //a new document to edit document = Dispatch.call(documents,”Add”).toDispatch();  } public void insertText (String textToInsert)  {  // Get the current selection within Word at the…

Java uses jacob to convert word, excel, and ppt in Microsoft office to pdf

The example in this article shares with you the specific code of using Java to convert Microsoft office documents into PDF for your reference. The specific content is as follows Before using jacb, we need to download jacob.jar and jacob-1.18-x64.dll Secondly, we need to put jacob-1.18-x64.dll into the bin directory of jdk before it can be used Third, before using jacb, we need to ensure that office can be used normally If you are currently using a maven project, then sorry, the official jacb resource file has not been released yet. We need custom maven dependencies, as follows: com.jacob jacob 1.7 system ${basedir}/../fileConvertApp/src/main/webapp/WEB-INF/lib/jacob.jar Then you need to pay attention to the address of the jar, which needs to be modified according to your own situation Next, let’s post the specific code snippets used import java.io.File; import org.apache.log4j.Logger; import com.jacob.activeX.ActiveXComponent; import com.jacob.com.Dispatch; import com.jacob.com.Variant; /** *Converter Util * * @author Jason * */ public class OfficeConverterUtil { /** * log */ private static Logger logger = Logger.getLogger(OfficeConverterUtil.class); private static final int WDFO_RMATPDF = 17; private static final int XLTYPE_PDF = 0; private static final int PPT_SAVEAS_PDF = 32; public static final int WORD_HTML = 8; public static final int WORD_TXT =…

javaword,excel,ppt to pdf

Preparation 1. Download jacob.jar Link: https://pan.baidu.com/s/1TWIGyX9A3xQ6AG9Y3mVlVg Extraction code: abcd 2. Download and install wpsWPS Office-Supports multiple people to edit multiple document formats online_WPS official website 3. Add jar to the project and ddl file in jre/bin of jdk directory, remember whether your system is 64-bit or 32-bit Put the ddl file in the jdk directory If the system has not set up javahome, remember to set it up path plus 4. Add jacob.jar to the project. I use the idea springboot maven project and execute maven to package it into the project mvn install:install-file – Dfile=d:\jacob.jar -DgroupId=com.jacob -DartifactId=jacob -Dversion=1.19 -Dpackaging=jar Replace the red font with your own com.jacobjacob1.19 5. After the preparations are completed, let’s add the code import com.jacob.activeX.ActiveXComponent;import com.jacob.com.Dispatch;public class ToPdfTest {private static final int wdFormatPDF = 17;private static final int xlsTypePDF = 0;private static final int ppSaveAsPDF = 32;public static void main(String[] args) {String path = “D:\\222.ppt”; //Place the file that needs to be converted in the corresponding location String pdfPath = “D:\\test222.pdf”;// pdfPath is the path to the generated PDF file //boolean bo = ToPdfTest.wordtoPDF(path, pdfPath); //word transfer //boolean bo = ToPdfTest.exceltoPDF(path, pdfPath); //excel to boolean bo = ToPdfTest.ppttoPDF(path, pdfPath);if (bo) {System.out.println(“Congratulations, the conversion is completed!”);}…

java: Tools (Chinese to Pinyin, compressed package, EXCEL, JFrame window and file selector, SFTP upload and download, FTP tool class, SSH)

java Upload Compression excel Documents sftp ftp ssh import Write your review! Come on, watch it all Member login | User registration Recommended reading io Java 8 clock fix() method with examples Java8 clock fix() method, original text with example: https://ww… [detailed] Crayon Shin-chan 2023-09-24 20:56:10 java Detailed explanation of the atomic operation class AtomicInteger Why do you need the AtomicInteger atomic operation class? For arithmetic operations in Java, such as self-increment or self-decrement, without additional synchronization operations, they are thread-unsafe in a multi-threaded environment. num++ resolves to numnum+1… [detailed] Crayon Shin-chan 2023-09-24 22:40:31

javaword,excel,ppt to pdf

Preparation 1. Download jacob.jar Link: https://pan.baidu.com/s/1TWIGyX9A3xQ6AG9Y3mVlVg Extraction code: abcd 2. Download and install wpsWPS Office-Supports multiple people to edit multiple document formats online_WPS official website 3. Add jar to the project and ddl file in jre/bin of jdk directory, remember whether your system is 64-bit or 32-bit Put the ddl file in the jdk directory If the system has not set up javahome, remember to set it up path plus 4. Add jacob.jar to the project. I use the idea springboot maven project and execute maven to package it into the project mvn install:install-file – Dfile=d:\jacob.jar -DgroupId=com.jacob -DartifactId=jacob -Dversion=1.19 -Dpackaging=jar Replace the red font with your own com.jacobjacob1.19 5. After the preparations are completed, let’s add the code import com.jacob.activeX.ActiveXComponent;import com.jacob.com.Dispatch;public class ToPdfTest {private static final int wdFormatPDF = 17;private static final int xlsTypePDF = 0;private static final int ppSaveAsPDF = 32;public static void main(String[] args) {String path = “D:\\222.ppt”; //Place the file that needs to be converted in the corresponding location String pdfPath = “D:\\test222.pdf”;// pdfPath is the path to the generated PDF file //boolean bo = ToPdfTest.wordtoPDF(path, pdfPath); //word transfer //boolean bo = ToPdfTest.exceltoPDF(path, pdfPath); //excel to boolean bo = ToPdfTest.ppttoPDF(path, pdfPath);if (bo) {System.out.println(“Congratulations, the conversion is completed!”);}…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索