duanchong3075 2011-06-24 08:03
浏览 68

如何在日期范围内将Excel数据插入数据库

I would like to insert some excel data in range of 21 days (from day 1 until day 21)into database. Use in PHP coding :)

Can anyone give me a helping hand ,

1) If it is the first time insert excel data into the database table, the data are the whole date in excel column, after that the database will check if table is NOT empty, it will just update the data.(Will this be possible?)

2)Lets for example : $today is 06/24 , the first day in excel file, it will only insert the whole data into database from excel file although the rest of data inside the excel column are empty. While if 06/24 is the 10th day in excel file, the database will only update data on 06/24.

thanks~

  • 写回答

1条回答 默认 最新

  • dongxietao0263 2011-06-24 08:32
    关注

    You can do this using php ExcelReader. It return all data in array after that you can insert it according to date rage (If exists then update otherwise insert) in your database easily. Find below link to download ExcelReader.

    http://code.google.com/p/php-excel-reader/downloads/list

    评论

报告相同问题?

悬赏问题

  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示