只保留Excel中的某些部分文本

时间:2017-09-20 18:11:31

标签: excel text formula

我在大量列中都有类似下面的文字,我想只保留“混合媒体”部分,是否可以使用任何内置公式或是否需要VBA?

{"urls":{"web":{"discover":"http://www.x.com/discover/categories/art/mixed%20media"}},"color":16760235,"parent_id":1,"name":"**Mixed Media**","id":54,"position":6,"slug":"art/mixed media"}

非常感谢

1 个答案:

答案 0 :(得分:0)

使用此:

 /**
 * @Route("/uploadImage",  name="uploadImage")
 */
public function uploadImageAddAction(Request $request) {
    $image = $request->files->get("image");
    $target_dir = "http://www.example.com/web/images/";



    $filesExtensions = ['jpg', 'jpeg', 'png', 'gif'];
    if ($image->getError() == 0) {

        if ($image->getClientSize() > 20000) {
            $msg = "El archivo es muy grande";
            $uploadOk = 0;
        } else if (!(in_array($image->getClientOriginalExtension(), $filesExtensions))) {
            $msg = "Only files .jpg,.jpeg.,.png,.gif";
            $uploadOk = 0;
        } else {

            if ($image->move($target_dir, $image->getClientOriginalName())) {
                $uploadOk = 1;
                $msg = "File succesfully uploaded";

            }
        }
    }

    return new JsonResponse(['status' => $uploadOk, 'msg' => $msg]);
}

enter image description here