小编Eri*_*rde的帖子

读取PHPExcel修改的.xls文件时xlrd崩溃

我使用PHP和python编辑一些Excel文件非常困难.

我最初使用PHPExcel在PHP中做了所有事情,但我处理的是非常大的文件,当内存不足时PHPExcel崩溃了.所以我把它改成了用PHP做一些工作,然后用python做其余的工作.

所以这个过程是:

  • 解析xml发布到PHP脚本
  • 根据xml数据将行插入Excel(.xls)文件
  • 将(.xls)文件和xml数据传递给python脚本以填充电子表格
  • 恩.python upload.py Example.xls data.xml由PHP调用
  • python脚本使用xlrd,xlwt和xlutils来填充Excel文件

我遇到的问题是,如果python脚本修改了我手工创建的常规.xls文件,它可以很好地工作.但是一旦PHP excel修改了Excel文件,python脚本就会产生以下错误:

_locate_stream(Workbook): seen
  0  5 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 
 20  4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 
100= 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 …
Run Code Online (Sandbox Code Playgroud)

php python xlrd phpexcel

5
推荐指数
1
解决办法
2469
查看次数

如何将光标垂直居中在UITextView中

我尝试将文本光标垂直居中在UITextView中.

// creating the inputText
[inputTextView removeFromSuperview];
inputTextView = [[UITextView alloc]initWithFrame:CGRectMake(CGRectGetMaxX(searchIconsButton.frame) + 3 , 0, buttomView.frame.size.width * 0.78 , buttomView.frame.size.height *0.80)];
inputTextView.layer.borderColor = [UIColor lightGrayColor].CGColor;
inputTextView.layer.borderWidth = 0.6;
inputTextView.center = CGPointMake(inputTextView.center.x, buttomView.frame.size.height / 2);
inputTextView.autocorrectionType = UITextAutocorrectionTypeNo;
[inputTextView.layer setCornerRadius:6];
[inputTextView setTintColor:[UIColor blackColor]]; // set the cursor color to black
inputTextView.textAlignment = UIControlContentVerticalAlignmentCenter;
Run Code Online (Sandbox Code Playgroud)

我尝试在最后一行做UIControlContentVerticalAlignmentCenter,但它仍然无法正常工作.

您可以看到光标隐藏在Textview中.

有办法解决吗?

objective-c textview

3
推荐指数
1
解决办法
1217
查看次数

标签 统计

objective-c ×1

php ×1

phpexcel ×1

python ×1

textview ×1

xlrd ×1