Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何编写excel?_Java_Selenium_Automation - Fatal编程技术网

Java 如何编写excel?

Java 如何编写excel?,java,selenium,automation,Java,Selenium,Automation,我正在尝试写一些excel的东西,我尝试了一些东西但是没有用。我不知道怎么做 XSSFWorkbook wb1 = new XSSFWorkbook(); Sheet shee = wb1.createSheet("Data"); FileOutputStream fileOut = new FileOutputStream("C:\\Users\\User_2\\Desktop\\video.xlsx"); wb1.write(fileOu

我正在尝试写一些excel的东西,我尝试了一些东西但是没有用。我不知道怎么做

 XSSFWorkbook wb1 = new XSSFWorkbook();     
 Sheet shee = wb1.createSheet("Data");         
 FileOutputStream fileOut = new 
 FileOutputStream("C:\\Users\\User_2\\Desktop\\video.xlsx");
        wb1.write(fileOut);
         d.get("http://freevideolectures.com/Course/3680/Pentaho-BI");
         java.util.List<WebElement> cl = 
         d.findElements(By.xpath("//ul[@class='lecture_menu']/li/a"));
                            for (WebElement wel : cl) {
                                 String href = wel.getAttribute("href");
                                  System.out.println(href);
xssf工作簿wb1=新的xssf工作簿();
shee=wb1.createSheet(“数据”);
FileOutputStream fileOut=新建
FileOutputStream(“C:\\Users\\User\u 2\\Desktop\\video.xlsx”);
wb1.写入(文件输出);
d、 得到(”http://freevideolectures.com/Course/3680/Pentaho-BI");
java.util.List cl=
d、 findElements(By.xpath(“/ul[@class='classtouch\u menu']]/li/a”);
for(WebElement wel:cl){
字符串href=wel.getAttribute(“href”);
System.out.println(href);

我想在excel中打印输出,需要帮助!

此链接肯定会帮助您:

我不知道具体如何,我对selenium和编程不熟悉,您能帮我吗???@DebanjanB您能帮我吗??